[jdev] Local history storage

Will Thompson will.thompson at collabora.co.uk
Wed Dec 19 09:01:13 UTC 2012

On 19/12/12 08:14, Justin Karneges wrote:
> On Wednesday, December 19, 2012 08:14:34 AM David E. Ammouial wrote:
>> I'm currently switching from Gajim to Empathy (trying it out becomes I'm
>> discovering GNOME 3), and as a user I'd like to express a wish to client
>> developers: IMHO, clients should store the chat history at the same place.
> [...]
>> Of course, the exact format would need to be thoughtfully defined, but
>> does the goal itself sound reasonable?
>> (I'm well aware of the efforts to store history on server side, but I
>> think local history will still be around for a while.)
> I've been wanting this since forever. Email has mbox and Maildir. IM could use
> something similar. Maybe we could even just use an email format (conversations
> in RFC822 format anyone?). I say it now just so it gets said.

I think you're suggesting storing each message as a separate email?

For a data point, Google Talk conversation logs show up over IMAP as 
emails, with one email per conversation. One alternative in the mail is 
human-readable HTML; the more interesting one is a <conversation 
xmlns='google:archive:conversation'> document with simple <message 
xmlns='jabber:client'> children. 1-1 conversations have the From: header 
set to your correspondent; MUCs have all participants in CC:.

I spent a little while hooking this up to Telepathy's log storage a few 
months ago and it was pretty straightforward, because of course we 
already have the machinery needed to show <message>s. Appending messages 
to the log file as a conversation continues would be more painful in 
that format, though.

Storage as one or more emails lets one use existing tools to quickly 
index and search by sender, time etc.

It seems a bit of a shame that XEP-0136 doesn't use collections of 
<message> elements timestamped with jabber:x:delay/urn:xmpp:delay. I'm 
late to the party, but presumably this was considered and rejected for 
some reason?


More information about the JDev mailing list