Skip to content

Commit

Permalink
Ignore self-presence in ParticipantStatusListener
Browse files Browse the repository at this point in the history
  • Loading branch information
guusdk committed Jul 31, 2022
1 parent e160cee commit 5f18332
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ public MultiUserChatOccupantIntegrationTest(SmackIntegrationTestEnvironment envi

mucAsSeenByTwo.addParticipantStatusListener(new ParticipantStatusListener() {
@Override public void joined(EntityFullJid participant) {
results.add(participant);
// Ignore self-presence, but record all other participants.
final EntityFullJid participantTwo = JidCreate.entityFullFrom(mucAddress, nicknameTwo);
if (!participantTwo.equals(participant)) {
results.add(participant);
}
}
});

Expand Down

0 comments on commit 5f18332

Please sign in to comment.