1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

[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

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();