Skip to content

Conversation

@David-Henner
Copy link
Contributor

@David-Henner David-Henner commented Jan 21, 2026

BugWPB-22820 [iOS] Repeated “Added to Group” push notifications for existing members

Issue

Some users are experiencing push notifications being presented, indicating they've been added to a conversation, when they're already members of that conversation. They reported seeing these notifications more than once for the same conversation.

Cause

Clients receive and process member-join events with their self user being included in the payload as one of the added members, even though they're already members of the conversation. This causes notifications to be shown incorrectly.

Solution

The cause for these member-join is unclear, but we can prevent them from triggering notifications by verifying whether the user is already a member of the conversation.

Testing

No clear steps to reproduce. We'll rely on unit tests to verify that notifications aren't created incorrectly.

We can still manual verify that notifications are being shown when needed, by adding a user to a conversation and verifying that their client receives a notification.


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

@David-Henner David-Henner force-pushed the fix/incorrect-added-to-group-notification-WPB-22820 branch from 21ddfbb to 46c81e5 Compare January 21, 2026 15:28
@David-Henner David-Henner changed the base branch from develop to release/cycle-4.14 January 21, 2026 15:30
@David-Henner David-Henner marked this pull request as ready for review January 21, 2026 16:42
@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

Test Results

    5 files    644 suites   4m 33s ⏱️
3 858 tests 3 830 ✅ 28 💤 0 ❌
3 859 runs  3 831 ✅ 28 💤 0 ❌

Results for commit de5f287.

♻️ This comment has been updated with latest results.

@David-Henner David-Henner enabled auto-merge (squash) January 27, 2026 12:41
@David-Henner David-Henner disabled auto-merge January 27, 2026 12:41
Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

}

// Check if self user is already a participant
guard !conversation.localParticipants.contains(selfUser) else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Could there be a situation where self user is added to this conversation just before this notification code is triggered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's difficult to say with certainty because showing notifications is handled by the NSE while processing the event and applying its effects (adding the user) is performed by the main app. I tested it and it works, i.e: I get the notification when I'm supposed to. But there could perhaps be a case where the order of execution between the main app and the NSE cause the user to be added before the notification is created?

override func shouldCreateNotification() -> Bool {
// we don't want to create notifications when other people join or leave conversation
let concernsSelfUser = event.userIDs.contains(ZMUser.selfUser(in: moc).remoteIdentifier)
let selfUser = ZMUser.selfUser(in: moc)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is this code still live? Maybe only when the app is open?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's unused & the code is already removed on develop. I removed the changes and left only the ones being used by the new sync system

… github.com:wireapp/wire-ios into fix/incorrect-added-to-group-notification-WPB-22820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants