Skip to content

fix(conversation): Skip last message update when adding or removing participants#18657

Draft
sudormant wants to merge 13 commits into
mainfrom
bugfix/11882/skipLastMessage
Draft

fix(conversation): Skip last message update when adding or removing participants#18657
sudormant wants to merge 13 commits into
mainfrom
bugfix/11882/skipLastMessage

Conversation

@sudormant

@sudormant sudormant commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

☑️ Resolves

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🛠️ API Checklist

🚧 Tasks

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible

@sudormant
sudormant requested a review from nickvergessen July 13, 2026 14:41
@nickvergessen nickvergessen changed the title Bugfix/11882/skip last message - push test, tests still fail, do not merge to main yet fix(conversation): Skip last message update when adding or removing participants Jul 14, 2026
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Jul 16, 2026
sudormant and others added 12 commits July 23, 2026 14:21
…vity flag for event dispatcher from false to true. This should help with chat state changes (users removed / added, moderators promoted / demoted) from triggering a reordering in the room list in Nextcloud Talk.

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
…tMetadaActivity for Rooms and Threads, similar to lastActivity. This also adds a database migration for the oc_talk_rooms and oc_talk_threads tables as well. Functions are introduced and prepared for later use. The use of the field lastActivity to signal when the last real message in a conversation appeared remains unchanged to keep the API stable. The intended use of this feature is to better distinguish between real messages (lastActivity) to notify and bump conversations in the thread list to the top, and other status / metadata related messages (lastMetadataActivity) like room state and participant list changes that shall get synced and be updated in the clients, but not trigger an activity bump of its conversations in the thread list.

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
…t will still go by last message activity, after introducing lastMetadataActivity, and not sort by last metadata changes in rooms like participant list updates.

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
…oms and Threads to use / set lastMetadataActivity instaed of lastActivity where appropriate, i.e. where system messages are signalled and not real chat messages.

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
…em messages like user added or removed, moderator promoted or demoted trigger an activity bump of the conversation in the list and move it to the top. This fix keeps activity bumps for real chat messages but won't bump the activity anymore for the aforementioned system messages. This fix also incorporates use of the new lastMetadataActivity field to update this information instead of lastActivity accordingly and can be expanded later on to handle other kind of messages differently. No changes client side are needed.

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
…s only to rooms, remove same handling from threads

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
…ssageUpdate to be compatible with another pull request making this field private

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
…e (like room creation) when deciding whether to bump activity

Signed-off-by: Christian Lorang <madcatcl2@gmx.de>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: sudormant <madcatcl2@gmx.de>
…e comments

Signed-off-by: Christian Lorang <christian.lorang@nextcloud.com>
…comments

Signed-off-by: Christian Lorang <christian.lorang@nextcloud.com>
@sudormant
sudormant force-pushed the bugfix/11882/skipLastMessage branch from f024e96 to 4dd48b0 Compare July 23, 2026 12:23
@sudormant sudormant added this to the ⛅ Next Major (35) milestone Jul 23, 2026
@sudormant sudormant self-assigned this Jul 23, 2026
@sudormant sudormant added bug feature: chat 💬 Chat and system messages feature: api 🛠️ OCS API for conversations, chats and participants feature: conversations 👥 and removed AI assisted This PR contains AI-assisted commits labels Jul 23, 2026
Signed-off-by: Christian Lorang <christian.lorang@nextcloud.com>
@nickvergessen

Copy link
Copy Markdown
Member

As per chat pausing this for now until we have a fresh mind and can find a solution

@nickvergessen
nickvergessen marked this pull request as draft July 24, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug feature: api 🛠️ OCS API for conversations, chats and participants feature: chat 💬 Chat and system messages feature: conversations 👥

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Order in the chat overview is messed up when a new user is added

3 participants