1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Add MultiUserChatManager

apply the Manager pattern to 'muc'. This prevents the user creating
multiple MultiUserChat instances for the same MUC.

Move the static method from MultiUserChat to MultiUserChatManager.

Also add AbstractNodeInformationProvider.
This commit is contained in:
Florian Schmaus 2014-10-13 22:13:43 +02:00
parent 0ef50bfd1e
commit b54d133b36
7 changed files with 438 additions and 375 deletions

View file

@ -40,7 +40,7 @@ import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
import org.jivesoftware.smackx.muc.MultiUserChat;
import org.jivesoftware.smackx.muc.MultiUserChatManager;
import org.jivesoftware.smackx.muc.packet.MUCUser;
import org.jivesoftware.smackx.workgroup.MetaData;
import org.jivesoftware.smackx.workgroup.WorkgroupInvitation;
@ -128,7 +128,7 @@ public class Workgroup {
/**
* Internal handling of an invitation.Recieving an invitation removes the user from the queue.
*/
MultiUserChat.addInvitationListener(connection,
MultiUserChatManager.getInstanceFor(connection).addInvitationListener(
new org.jivesoftware.smackx.muc.InvitationListener() {
public void invitationReceived(XMPPConnection conn, String room, String inviter,
String reason, String password, Message message) {