[jdev] Can I define a content-type for messages?
Jan Torben Heuer
jtnews at mail2004.dnsalias.org
Mon Mar 23 09:15:54 CDT 2009
On Monday 23 March 2009 14:05:02 Remko Tronçon wrote:
> > Currently, I ignore the content-type in my prototype but that is not very
> > elegant. Is a content type for messages already supported or can I easily
> > derive such a message type?
> What types of content are you sending? Messages currently only have
> plain text bodies, and XHTML-IM bodies. If you want to add custom
> payloads to messages, you can define your own element in your own
> namespace to wrap the data in.
There are differnt kinds of data which I want to exchange:
RDF/XML, RDF N3 and both as PGP-encrypted.
I don't want my application to guess the contents so I'd prefer to mark it
somehow. I think that nobody here already did such stuff with the SMACK API?
> Clients typically send messages to the 'bare' JID (without a
> resource). The server will then typically route this to the resource
> with the highest priority. To avoid receiving messages in a bot, use a
That sounds great! But they still share the same roster and recieve all
Presence information? I'd then just have to filter the presence notification
and check that the Resource matches e.g. "/mybot".
> negative priority in the presence of the bot. Servers will not route
> messages to resources with negative priority (unless the client
> explicitly asks to deliver the message to that specific resource).
Even, if only the bot will be online?
More information about the JDev