How to get user/groups imageUrl on the All Chat part?
sahu-gaurav opened this issue · 1 comments
sahu-gaurav commented
How to get user/groups imageUrl on the All Chat part?
rxmoein commented
If you want to access group's public data such as name, photo and ... you should use the public field on each topic.
As you see in the example, I'm printing the name of the group here using item.public['fn']
:
print('Subscription[' + item.topic.toString() + ']: ' + item.public['fn'] + ' - Unread Messages:' + item.unread.toString());
This does not mean that the name of the group / chat is always going to be saved in that field.
The public
field is user defined and the structure of data is going to be defined by application. You might want to have an interface for that.
In the sandbox or web version, application is using fn
key to store full name and photo
to store the picture. Picture is stored as a string in public object (base64)