mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 03:27:59 +01:00
Change muc.InvitationListner to use the MUC instance
This commit is contained in:
parent
d27ec34fa3
commit
ff8720698a
3 changed files with 5 additions and 3 deletions
|
@ -40,7 +40,7 @@ public interface InvitationListener {
|
|||
* @param password the password to use when joining the room.
|
||||
* @param message the message used by the inviter to send the invitation.
|
||||
*/
|
||||
public abstract void invitationReceived(XMPPConnection conn, String room, String inviter, String reason,
|
||||
public abstract void invitationReceived(XMPPConnection conn, MultiUserChat room, String inviter, String reason,
|
||||
String password, Message message);
|
||||
|
||||
}
|
||||
|
|
|
@ -127,8 +127,9 @@ public class MultiUserChatManager extends Manager {
|
|||
// Check if the MUCUser extension includes an invitation
|
||||
if (mucUser.getInvite() != null) {
|
||||
// Fire event for invitation listeners
|
||||
MultiUserChat muc = getMultiUserChat(packet.getFrom());
|
||||
for (InvitationListener listener : invitationsListeners) {
|
||||
listener.invitationReceived(connection(), packet.getFrom(), mucUser.getInvite().getFrom(),
|
||||
listener.invitationReceived(connection(), muc, mucUser.getInvite().getFrom(),
|
||||
mucUser.getInvite().getReason(), mucUser.getPassword(), message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,8 @@ public class Workgroup {
|
|||
*/
|
||||
MultiUserChatManager.getInstanceFor(connection).addInvitationListener(
|
||||
new org.jivesoftware.smackx.muc.InvitationListener() {
|
||||
public void invitationReceived(XMPPConnection conn, String room, String inviter,
|
||||
@Override
|
||||
public void invitationReceived(XMPPConnection conn, org.jivesoftware.smackx.muc.MultiUserChat room, String inviter,
|
||||
String reason, String password, Message message) {
|
||||
inQueue = false;
|
||||
queuePosition = -1;
|
||||
|
|
Loading…
Reference in a new issue