[muc] Only notify() about processed self-presence once

Since notify() is a rather expensive operation, we should only invoke
it once. Especially since some servers include 110 in all self
presences, not just the initially reflected one on MUC join.
This commit is contained in:
Florian Schmaus 2021-12-13 21:20:40 +01:00
parent d1273532ce
commit e39adff40f
1 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,8 @@ public class MultiUserChat {
switch (presence.getType()) {
case available:
if (mucUser.getStatus().contains(MUCUser.Status.PRESENCE_TO_SELF_110)) {
if (!processedReflectedSelfPresence
&& mucUser.getStatus().contains(MUCUser.Status.PRESENCE_TO_SELF_110)) {
processedReflectedSelfPresence = true;
synchronized (this) {
notify();