1

In my current project I want to communicate with people in a XMPP Multi User Chat. But also I need to send data to all participants in the conference, but this data should not be seen as a message.

Is it possible to send data (strings) to all participants in a MuC channel by not using a normal chat message?

I'm using Smack API, and I assume, that all participants use my program.

Thanks in advance!

Smashnet
  • 45
  • 5

1 Answers1

1

The solution is to use a normal message (with type="groupchat"), but do not include a <body>.

I do not know how this is done in Smack, or if it is possible (I hope it is). An example message would be:

<message to="room@conference.server" type="groupchat">
    <yourdata xmlns="your-xmlns">
       <anything-you-want-here/>
    </yourdata>
</message>

XMPP clients will ignore this message, as it has no <body> tag.

Neysor
  • 3,893
  • 11
  • 34
  • 66
MattJ
  • 7,924
  • 1
  • 28
  • 33
  • Thanks a lot, this works like a charm :) Just saw that Smack implements the possibility to add "properties" to a message, which does exactly what you wrote. – Smashnet Mar 27 '12 at 10:16