My favorites | Sign in
Project Home Wiki Issues Source
Search
for
mod_archive  
XEP-0136: Message Archiving
Stage-Beta
Updated Jul 5, 2011 by MWild1

Introduction

Currently many XMPP clients save the messages locally and it's not convenient or even possible to retrieve the historical messages, especially when one switches the clients a lot.

Details

This module keeps an archive of incoming and outgoing messages for each user on the server, and allows the user to query and manage this archive using the XMPP extension described in XEP-0136: Message Archiving.

Note: If you are an administrator looking for a module just for centrally logging messages passing to/from users on your server, this probably isn't the module you are looking for (mod_archive is for user-managed archives). We'd really like to hear about your requirements to make a module more tailored to this kind of use-case though (especially how/where you would like the messages stored)... drop us an email at developers@prosody.im to let us know.

Usage

First copy the module to the prosody plugins directory.

Then add "archive" to your modules_enabled list:

    modules_enabled = {
                    -- ...
                    "privacy",
                    "archive",
                    -- ...

Configuration

Name Description Type Default value
default_max the maximum number of items to return when requesting collection list or archived messages integer 100
force_archiving archive every message automatically, and do NOT consider the preferences boolean false
auto_archiving_enabled applied when no any preferences available boolean true

Compatibility

0.7.0 Works

TODO

  • consider 'exactmatch' attribute when do JID matching.
  • return a <feature-not-implemented/> error when the client set the value of the 'save' attribute to 'stream'.
Comment by singpol...@gmail.com, Apr 15, 2011

Has anyone tested this with 0.8?

Comment by puh...@gmail.com, Apr 19, 2011

Not working with 0.8. All incoming messages lost. Same for mod_archive_muc.

Error log: http://pastie.org/1812342

Comment by stephen....@gswot.org, Apr 19, 2011

I'm working on fixing the previous issues with this one, and also making it work with 0.8.0

Comment by stephen....@gswot.org, Apr 19, 2011

This patch seems to fix the problems: http://pastie.org/1813016

Comment by puh...@gmail.com, Apr 19, 2011

Thanks for your patch!

After patch j2j msgs begin to work as they should. But msgs from/to transports are broken and never reach destination.

Comment by nathanws...@gmail.com, May 16, 2011

Just out of curiosity, is there a reason it does not log outgoing messages? I realize that it's not really need if everyone is using the same server, but what about the case when chatting with someone on gmail? Then you would only get one half of the chat log. Or am I just missing a setting somewhere?

Comment by singpol...@gmail.com, Jun 10, 2011

If you use my patch it will log outgoing messages :)

Comment by quetz...@gmail.com, Jul 5, 2011

it is not possible to push the patch in the repo ?

Comment by project member MWild1, Jul 5, 2011

Hmm, I'd not seen all these comments. Just enabled comment notification so we don't miss them in future.

The correct fix for the issue of not logging messages to remote servers is to split msg_handler into 2 functions - one for outgoing messages and one for incoming messages. The outgoing handler should be set for pre-message/ and the incoming handler for message/ (except /host). I don't have time to make and test the changes right now, but it would be great if someone else could.

Also just a general note - this module is beta at the moment. Please do not use it on public servers or in production. The main issue at the moment (apart from the small fix discussed above) is the data storage - Prosody's storage system isn't capable of efficiently storing large archives of messages, and this is something we're planning to add in a future version (0.9 if we have time, it's quite high priority).

Comment by singpol...@google.com, Jul 26, 2011

What do you mean "and the incoming handler for message/ (except /host)" ?

Also: using my patch it seems there may be a problem processing messages that are from and to different accounts on the same domain. I'm not sure what's up with that. Hopefully I'll be able to debug soon.


Sign in to add a comment
Powered by Google Project Hosting