Pregunta

I'm trying to build an app that uses PubNub, but I can't figure out how to set a chat name. The Github demo doesn't seem to handle chat names, but it would seem strange to not identify who the chats are coming from. Is there a certain dictionary key that I need to use? I tried "chatName", but that didn't work.

¿Fue útil?

Solución

Did you try 'user_name' like this:

- (NSDictionary *)asDictionary;
{
    return @{
   @"type" : @"chat", @"user_id" : @([self userId]), @"user_name" : [self userName], @"user_stores" : [self userStores], @"body" : [self body], @"time" : [self time]
    };
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top