Add room JID as parameter to XMPPMUC delegate methods #150

merged 1 commit into from May 3, 2013


None yet

4 participants


Passing this always-needed parameter here clarifies the semantics of this delegate callback. Even the simplest delegate implementation will need the room JID to handle the invitation request (e.g. to pass to XMPPRoom). It takes some digging into the MUC protocol to realize that the room JID is the from address.

instead of passing the jid, why dont you pass the actual room?
it would be more OO :)


When the client receives an invitation, the room doesn't exist yet. I suppose it could instantiate and activate a room and then just let the caller invoke -addDelegate:delegateQueue: and -joinRoomUsingNickname:.

In -[XMPPMUC xmppStream:didReceiveMessage:]

self.xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:self.roomStorage
                                                  jid:[message from]];
[self.xmppRoom activate:self.xmppStream];

In delegate:

[self.xmppRoom addDelegate:self delegateQueue:dispatch_get_main_queue()];
[self.xmppRoom joinRoomUsingNickname:@"me" history:nil];

Is that what you have in mind?

@ObjColumnist ObjColumnist merged commit ddbf12b into robbiehanson:master May 3, 2013

Thanks, Spencer.

@paulmelnikow paulmelnikow deleted the paulmelnikow:pullreq6 branch May 3, 2013

How to invite and Message the User in xmpp chat Room using iphone ..if any body knows please do the needful thank You.


Please ask this on the XMPPFramework Mailing List.

Thanks spencer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment