mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
[muc] Add generic callback invoked if a participant is removed
Fixes SMACK-883.
This commit is contained in:
parent
ab2d3a2b79
commit
50cb7735d1
2 changed files with 15 additions and 0 deletions
|
@ -271,6 +271,10 @@ public class MultiUserChat {
|
|||
for (UserStatusListener listener : userStatusListeners) {
|
||||
listener.removed(mucUser, presence);
|
||||
}
|
||||
} else {
|
||||
for (ParticipantStatusListener listener : participantStatusListeners) {
|
||||
listener.parted(from);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -50,6 +50,17 @@ public interface ParticipantStatusListener {
|
|||
default void left(EntityFullJid participant) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a participant is parted for whatever reason. This callback is always invoked if a participant
|
||||
* parted the room, either voluntarily or involuntarily. Prior this callback, a callback with a more specific
|
||||
* reason for the removal, like {@link #left(EntityFullJid)} may be invoked.
|
||||
*
|
||||
* @param participant the participant that was removed from the room.
|
||||
* @since 4.4
|
||||
*/
|
||||
default void parted(EntityFullJid participant) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a room participant has been kicked from the room. This means that the kicked
|
||||
* participant is no longer participating in the room.
|
||||
|
|
Loading…
Reference in a new issue