0

How can we get the list of incoming messages to a particular user based on uuid ? What need is to show the list of message for a particular user based on uuid , from all the channel the user is subscribed?

The requirement is to list the incoming message of a particular user. Same as the one we see in facebook message icon on right side

The available solution what i got is

1) get the channellist with uuid

PubNub.ngWhereNow()

2) get message from the channels return from the ngWhereNow

I need help to sort out whether there is any single api to get all the incoming message to based on uuid

guny
  • 197
  • 4
  • 19

1 Answers1

4

The easiest thing to do is to create a unique channel name, based on the UUID (or that maps to the UUID). Then you could subscribe to this channel to get messages for that user, pull history on it for later, etc.

Would that work for you?

Geremy
  • 2,415
  • 1
  • 23
  • 27
  • Is it possible to publish to multiple channels via a single API call? – guny Aug 13 '14 at 05:06
  • so what i understand is that for a single conversation in need to publish to two channels, say common channel commonChannelofUserAB , UserA conversation to ChannelforUserB and vice versa, and need to send multiple API call for a single chat? – guny Aug 13 '14 at 06:36
  • not "yet" :) But, what you could do is create a "public" channel, and publish to that. Or, if you need a unique "public" channel, you could create a channel called user1~user2, and always perform history off that. otherwise, you need to publish to two channels. – Geremy Aug 13 '14 at 17:57