XMPP Multi-user avatar chat setting for group chat

I am developing an iOS application with chat features. I am using XMPP for this application. In XMPP multi-user chat, is there any function for setting an avatar image or group image for a conference room, for example, what we do in whatsapp?

I checked the XEP-0045 extension, but that didn’t help,

So, I checked with Psi, creating conference rooms, I realized that the user has vcardso that he can save the avatar image, but XMPP does not provide any vcardsfor the groups we create. Now I understand why it is not available.

But I can’t convince whatsapp can achieve. I also thought of an alternative using pub / sub to send a group image to a url. But I'm looking for which default features provided by XMPP are invisible to my eyes.

Please agree if this feature is available or not in XMPP? OR offer any other answers you have?

+4
source share
1 answer

The best solution would be to place the image on some other server, download and retrieve a public path for that image, and share it as a custom stanza for a group image.

Example

<message from=abc@muc-light.chat.server.com to mygroup@muc-light.chat.server.com type=groupchat id=groupimage-XXXX>
  <body>groupimage</body>
  <metadata>
   <type>groupimage>
   <filesize>..bytes</filesize>
   <imageurl>https://...someurl.../groupimage_timestamp.jpg</imageurl>
  </metadata>
  </message>
  1. .
  2. , , URL- , , , factory - differnet ( )
    1. .

, whatsapp.

+1

Source: https://habr.com/ru/post/1628075/


All Articles