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

Vineet Naik naikvin at gmail.com
Fri Sep 14 07:49:30 MSK 2012


Hi Alexander,

Thanks for replying.

On Fri, Sep 14, 2012 at 4:07 AM, Alexander Tsvyashchenko
<lists at ndl.kiev.ua>wrote:

> Hi Vineet,
>
> On 5 вер. 2012, at 07:56, Vineet Naik wrote:
>
> I am using ejabberd for a web based one-to-one chat application (using
> strophe)
> where I need to pass along some extra data with some messages.
>
>
> [skipped]
>
> Also, it's mentioned in XEP-0136 that the default_auto_save preference can
> take
> 'message' as a value that would store the entire message rather than just
> the body
> but mod_archive_odbc doesn't seem to support this.
>
>
> A couple of relevant points:
>
>    - Is info you need to pass really message-specific, or
>    conversation-specific? In the latter case you can attach that extra info to
>    the collection using <x> element, I think mod_archive_odbc should support
>    this.
>    - If you need to store message-specific data indeed, you might
>    consider waiting for mod_archive2 release - it supports 'message' method of
>    storage. I recently resumed the work on it and adapted it to work with
>    ejabberd2, and while it is not yet production-ready (but neither is
>    mod_archive_odbc ;-), I successfully use it for my personal needs. I expect
>    to release it in the coming weeks, although if you're interested in early
>    testing - ping me & I'll give you access.
>
>
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?

Although this is working without any problems I understand that it doesn't
conform to the standard.
Right now we are having just one web based client (built by us) but I
am interested in a better solution if available.

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?

Regards,
Vineet



>
> Good luck!                                     Alexander
>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>


-- 
Vineet Naik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120914/811bd9f9/attachment.html>


More information about the ejabberd mailing list