GNOME Bugzilla – Bug 345304
gossip support
Last modified: 2018-07-03 09:54:28 UTC
I thought supporting gossip would be a good thing and made a preliminary patch. It doesn't load the contacts yet but it can actually index and find things, and display them in the log viewer (though gossip's log viewer is much much better). The log viewer doesn't seem to understand the HTML either... I'll attach the patch.
Created attachment 67620 [details] [review] patch adding gossip IM support
its a nice start near as I can tell. (But again, I've never used Gossip, so I can't say if the parsing is being done completely correct). Just a note: You directly access some hit properties like this hit ["fixme:speakingto_alias"] its generally safer and better to use hit.GetFirstProperty ("fixme:speakingto_alias")
Just adding to what Kevin suggested. If you are sure that there is and should be _only_one_ property-value with the key "fixme:speakingto_alias" and its an error otherwise, then use hit["fixme:speakingto_alias"]. Use the method GetFirstProperty() in other cases. GetFirstProperty is not designed to access single-valued properties.
Hm, ok. So far I had mostly copied from Gaim and/or Kopete :) I failed to mention that I put this here for discussion and am hoping someone else picks it up as I won't have time to work on it in the next 2 weeks and possibly more.
I'd suggest you post a message to the mailing list. I doubt any of the developers and h4x3rz use "gossip" to actively review/fix/text the backend.
Does Gossip store its logs in one large file per user? If so, additional work will be needed so that the entire file isn't parsed and reparsed each time. Johannes, you have a bunch of FIXMEs in the GossipLog constructor and some hardcoded values. Are those easy to fix? What information do you need to complete those? Other than this and what Bera suggested, it looks good!
No, gossip stores below ~/.gnome2/Gossip/logs/ for each account a directory: ~/.gnome2/Gossip/logs/johannes@sipsolutions.net/ in which you find: contacts.ini - containing config and nicknames (needs to be parsed), the format is: [Self] Name=Johannes [Contacts] xxxx@icq.sipsolutions.net=Xxx Yyy ...repeat... and a directory for each user: ~/.gnome2/Gossip/logs/johannes@sipsolutions.net/xxxxx%25hotmail.com%40msn.sipsolutions.net/ in which you find a log file per day: 20041015.log but not all days must exist, if you haven't talked to that person that day. Now, gossip itself separates discussions based on the elapsed time between utterances, which we should do as well. As for the hardcoded values, I wasn't quite sure what to put there and didn't implement parsing of any nickname stuff and thought that'd be needed.
Uh note that in my code there's some "config.ini" value, that should be "contacts.ini".
And for the // FIXME: This is not safe for all kinds of file/screennames comment, I have no idea :) I copied it from Kopete, I think it probably ought to be fine though it'll be url-encoded in some cases. But if I use the actual hard name (777@icq-gateway.my.jabber) will some other code look it up in the contacts list or do I need to do that myself?
Adding Martyn Russell to the CC; he's the Gossip maintainer and expressed some interest in a Gossip backend at GUADEC.
Thanks Joe. First let me say, this rocks! I have been meaning to get some Beagle support for Gossip for a while, and I only knew about this after Joe pointed it out at GUADEC. So thanks Johannes, great start! I have mentioned this recently on the gossip-dev list, but we intend to add support for conversation breaks in the logging at some point. This will probably be some sort of short xml attribute or element. This should make it easier to show chats in "conversations". Keep up the good work, and thanks again for this.
Martyn, maybe you could take a look through the discussion here and note what should be done. Or maybe a small chat with you and a person from beagle who knows how the nickname handling works... I wasn't able to figure out yet what I should do with nicknames and what the list is used for etc. I'm 'johill' on various IRC networks (gimpnet,freenode,oftc) if you want to ping me on IRC.
Does anyone have the status on this patch?
Sorry, I think this is waiting on me. Johannes: Ok, yea the nicknames which are in ~/.gnome2/Gossip/logs/<account id>/contacts.ini are basically the last known nick name of the contact. This is saved so we can use the nickname in the logs when we are offline. There are two sections: [Contacts] for everyone else, and [Self] for the name you are using for yourself with <account id>. In gossip, we then just replace the ID (in "to" or "from") with the name from contacts.ini. The nickname in the .log file is a backup and is the nickname that was used at the time of writing the log (which may not be up to date). I hope this answers your questions. You can find me in #imendio, #gnome-hackers, #gtk+ on gimpnet or #telepathy on freenode (as martyn).
Martyn, thanks for your comments and sorry that I took such a long time to reply. Unfortunately, at this time I'm unable to work on this patch at all, probably until December or so. I'd appreciate if someone else would pick it up, but if not I may be able to do it myself sometime toward the end of the year.
I have some spare time and I think I can work on this, if nobody is working on this yet.
Yes please!
Enver, go ahead, I'm not working on this at the moment.
You should feel free to completely refactor the IM log code as necessary in Beagle; it's a big mess right now.
(In reply to comment #19) > You should feel free to completely refactor the IM log code as necessary in > Beagle; it's a big mess right now. I'll consider this Joe, thanks a lot.
Any word?
(In reply to comment #21) > Any word? Nothing yet, I'm sorry :/
Created attachment 76463 [details] [review] Gossip Backend Damn, I had 'Gossip backend' on my todo list, and didn't realize that I must have meant update this one.... Oh well, heres some majorly replicated code.
Any thoughts on this one? I backed off since someone else had already started, but I can keep working if theres no one else...
Beagle is not under active development anymore and had its last code changes in early 2011. Its codebase has been archived (see bug 796735): https://gitlab.gnome.org/Archive/beagle/commits/master "tracker" is an available alternative. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.