Persistent XMPP MUC (XEP-45), like WhatsApp groupchats

前端 未结 4 1111
醉话见心
醉话见心 2020-12-14 21:30

From the spec —

7.14 Exiting a Room

In order to exit a multi-user chat room, an occupant sends a presence stanza of type \"unavailable\"

4条回答
  •  粉色の甜心
    2020-12-14 22:05

    Yes you can make your group persistent by setting its configurations this way:

    NSString *var = [field attributeStringValueForName:@"var"];
    if ([var isEqualToString:@"muc#roomconfig_persistentroom"])
    {
        [field removeChildAtIndex:0];
        [field addChild:[NSXMLElement elementWithName:@"value" stringValue:@"1"]];
    }
    

提交回复
热议问题