I am working with David on the Cleartext ESM app and it is true we
have found very little common ground in this space with almost every
service having a different implementation, but more importantly a
different feature set (eg retweet, comments, direct messaging, etc).
A significant problem we have is that all of the various services try
to be helpful and format the message in a way that makes sense when it
is displayed in a chat message window, eg:
<body>SenderDisplayName (@senderId) : plainTextMessage</body>
The html version of the message will then have <a> tags round the
senderId and maybe <a> tags round #tags and @links in the message body.
We are getting atom packets from jaiku and identi.ca, but there is not
a great deal of overlap between these two.
To implement our own xmpp-based micro-blogging service we have created
our own extension to the message stanza - maybe not the best way to
deal with having too many formats, but I couldn't find a simple way to
represent the concept of re-tweets in the existing formats, we also
wanted to have the option of using vcards for avatars rather than
urls. A simple message would look like:
<message from='mblog.cleartext.com' to='[email protected]/
cleartext' type='chat'>
<body>SenderDisplayName (@senderId) : plainTextMessage</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'>
// html message
</html>
<x xmlns='http://cleartext.net/mblog'>
<text type="message">plainTextMessage</text>
<buddy type='sender'>
<displayName>Display Name</displayName>
<userName>userId</userName >
<serviceJid>mblog.cleartext.com</serviceJid>
<avatar
type='url'>http://www.path.to/avatar.jpg</avatar>
<buddy>
</x>
</message>
And a retweet or comment would look like this...
note that the originalSender has a jid and avatar hash allowing us to
get the user's avatar using a vcard request. The originalSender is
also on another domain allowing you to retweet from one service to
another (so long as both services implemented these stanzas). Direct
messages can be done by starting a chat with
[email protected] for the sender or using the jid value on
the originalSender.
<message from='mblog.cleartext.com' to='[email protected]/
cleartext' type='chat'>
<body>SenderDisplayName (@senderId) : plainTextMessage,
plainTextMessageOrComment</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'>
// html message
</html>
<x xmlns='http://cleartext.net/mblog'>
<text type="message">plainTextMessageOrComment</text>
<text type="originalMessage">plainTextMessage</text>
<buddy type='sender'>
<displayName>Display Name</displayName>
<userName>userId</userName >
<serviceJid>mblog.cleartext.com</serviceJid>
<avatar
type='url'>http://www.path.to/avatar.jpg</avatar>
<buddy>
<buddy type='originalSender'>
<displayName>Another Name</displayName>
<userName>anotherUserId</userName >
<serviceJid>mblog.example.com</serviceJid>
<jid>[email protected]</jid>
<avatar
type='hash'>56a03afdd9ab286d43c8f1715fac013d4c53f15a</avatar>
<buddy>
</x>
</message>
Any comments welcome.
--------------------------------------------------------------------------------------------------------
Email Filtering by Cleartext a Carbon Minimised company - www.cleartext.com
--------------------------------------------------------------------------------------------------------