diff --git a/Extensions/XEP-0045/XMPPRoom.m b/Extensions/XEP-0045/XMPPRoom.m index 22379f3b57..6e77606584 100644 --- a/Extensions/XEP-0045/XMPPRoom.m +++ b/Extensions/XEP-0045/XMPPRoom.m @@ -1053,7 +1053,11 @@ - (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)prese - (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message { - // This method is invoked on the moduleQueue. + if ([[message type] isEqualToString:@"chat"]) { // Room should not deal with single chat message + return NO; + } + + // This method is invoked on the moduleQueue. XMPPJID *from = [message from]; @@ -1093,6 +1097,10 @@ - (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message - (void)xmppStream:(XMPPStream *)sender didSendMessage:(XMPPMessage *)message { + if ([[message type] isEqualToString:@"chat"]) { // Room should not deal with single chat message + return NO; + } + // This method is invoked on the moduleQueue. XMPPJID *to = [message to]; diff --git a/Extensions/XEP-0136/XMPPMessageArchiving.m b/Extensions/XEP-0136/XMPPMessageArchiving.m index 57e8ce08e3..83482289d4 100644 --- a/Extensions/XEP-0136/XMPPMessageArchiving.m +++ b/Extensions/XEP-0136/XMPPMessageArchiving.m @@ -193,7 +193,11 @@ - (BOOL)shouldArchiveMessage:(XMPPMessage *)message outgoing:(BOOL)isOutgoing xm // // 2. 'otr' and 'expire' value are taken from the element that matches the contact, if present, // else from the default element. - + + if ([[message type] isEqualToString:@"groupchat"]) { // chat should not deal with groupchat message + return NO; + } + NSXMLElement *match = nil; NSString *messageThread = [[message elementForName:@"thread"] stringValue];