Skip to content

Messages marked as read when session is inactive #18734

Description

@anakin78z

Tip

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

See related issue here: nextcloud/talk-android#6370 (comment)

Note: I was able to reproduce this every single time yesterday, but today I'm getting inconsistent behavior, so this may not work for you on first try.

Steps to reproduce

User A & User B

  1. User B has Android client, and opens web client on desktop (I'm using Windows 11)
  2. User A sends message. User B receives message on web client & no notification on Android. 👍
  3. User B opens new window on desktop and fully covers web client.
  4. User A sends message. User B receives no notifications. Note: I'm getting inconsistent behavior here. Sometimes the web client is immediately marked as inactive, causing this step to trigger a notification, other times it isn't. It seems to matter what kind of window covers it. Covering it with Steam seems to keep it active every time. If you received a notification here, go back to step 3 and try covering the client with a different window.
  5. Wait 5 minutes
  6. User A sends another message. User B receives notifications on desktop and Android. However the Android notification immediately disappears.

So something caused the web client to be backgrounded, at which point notifications are enabled again. Looking at the web client network traffic though, it's sending a 'read' event (Endpoint: /chat/{token}/read), marking the message as read.

Image

So this seems like a bug with the web client. It correctly marks the session as backgrounded so notifications can be received, but it shouldn't mark messages as read until the web client receives focus again (or is foregrounded, or whatever the correct mechanism is).

Expected behaviour

Whenever notifications are enabled, messages should not be marked as read.

Actual behaviour

Messages are marked as read, causing notifications to disappear on Android client.

Talk app

Talk app version: (see apps administration page: /index.php/settings/apps)
v24.0.2

Custom Signaling server configured: yes/no and version (see Talk administration settings: /index.php/settings/admin/talk#signaling_server)
no

Custom TURN server configured: yes/no (see Talk administration settings: /index.php/settings/admin/talk#turn_server)
no

Custom STUN server configured: yes/no (see Talk administration settings: /index.php/settings/admin/talk#stun_server)
no

Browser

Microphone available: yes/no
yes
Camera available: yes/no
yes
Operating system: Windows/Ubuntu/Mac/...
Windows 11
Browser name: Firefox/Chrome/Safari/...
Vivaldi
Browser version: 124/125/...
Version
8.1.4087.53 (Official Build) (64-bit)
Chromium Version
150.0.7871.175

Browser log

Details ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```

Server configuration

Operating system: Ubuntu/RedHat/...
Ubuntu Server

Web server: Apache/Nginx

Database: MySQL/Maria/SQLite/PostgreSQL

PHP version: 8.1/8.2/8.3

Nextcloud Version: (see administration page)
34.0.0 (AIO)

List of activated apps:

Details
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your server installation folder

Nextcloud configuration:

Details
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

Server log (data/nextcloud.log)

Details
Insert your server log here

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions