[ejabberd] Archiving chat messages along with some extra data using mod_archive_odbc

Alexander Tsvyashchenko lists at ndl.kiev.ua
Sat Sep 22 11:30:03 MSK 2012


Hi Vineet,

On 14 вер. 2012, at 05:49, Vineet Naik wrote:

> The extra info is message specific. I managed to work around this by tweaking mod_archive_odbc
> to recognize an additional element alongside body and store it in a separate column in the archived_messages
> table. On client side, instead of passing the extra data as an attribute of message, it is now
> passed as a child element with custom XML namespace. 
> 
> Any thoughts on this approach?

AFAIK, using custom element in the message should be OK: http://xmpp.org/rfcs/rfc6120.html#stanzas-extended

Regarding the modification of mod_archive_odbc: as long as it works, it should be fine ;-) Alternatively, as I said  before, you might consider using 'message' storage type with mod_archive2, then you should have the whole message stored with your custom payload, which has an advantage (?) that this payload is also returned on all message retrieval operations.

> I have recently started learning erlang and still need to read a lot about XMPP :) But I play around with ejabberd
> in free time so I would be interested in testing mod_archive2 if it's fine with you. 
> Should I send you an email separately for the same?

I just pushed current version to https://github.com/ndl/mod_archive2 - feel free to play with it and contact me via e-mail if you need further info and / or submit bugs via github.

Thanks!

Good luck!                                     Alexander

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120922/b8e3f79e/attachment.html>


More information about the ejabberd mailing list