Modify

#917 closed defect (fixed)

Client-side buddy list support missing for certain libpurple protocols that require it

Reported by: Michał Siejak Owned by: dx
Priority: normal Milestone:
Component: BitlBee Version: devel
Keywords: Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro: OS-independent

Description

Currently bitlbee assumes that all libpurple protocols support server-side buddy list that is automatically downloaded from the server upon connection. That is not true for certain protocols like "gg" (Gadu-Gadu). This makes using those protocols with bitlbee impractical since one would need to readd all buddies by hand after every bitlbee restart.

I've written a patch for bitlbee which fixes this issue by adding client-side buddy list support for those protocols that require it (currently "gg" only). I've been using this patched version of bitlbee for quite some time now and everything seems to be working fine and stable. Please review and (hopefully) merge with the source tree.

Attachments (3)

0001-local-clist.patch (3.0 KB) - added by Michał Siejak at 2012-02-11T13:58:07Z.
gadugadu-local-clist-fixed.patch (3.0 KB) - added by dx at 2014-01-15T23:53:57Z.
The patch updated to 3.2.1
whatsapp-local-contacts.patch (2.2 KB) - added by dx at 2015-01-23T20:10:32Z.
here's the fix for the whatsapp side, will upstream it soon™ (and yes it turned out to be what i said about imcb_connected, yes i know it took too long, don't look at me that way)

Download all attachments as: .zip

Change History (12)

Changed at 2012-02-11T13:58:07Z by Michał Siejak

Attachment: 0001-local-clist.patch added

comment:1 Changed at 2012-03-12T23:44:38Z by wilmer

Ok, finally looking at this now. Looks good overall, but I think there's a setting that enables server-side contacts for gg in which case your patch should *not* be activated, right?

Also, nit: When the user adds a contact to his/her list, by default a nick entry isn't saved unless the user's manually renamed to something else than the default nick generated by BitlBee, either using the rename command or using an additional argument to add. Maybe your patch should change that behaviour for local-contacts accounts?

comment:2 Changed at 2012-03-25T23:40:16Z by wilmer

Priority: majornormal

comment:3 Changed at 2014-01-15T01:34:25Z by AndrzejL

Unfortunately this patch stopped working when upgrading from version 3.2 to version 3.2.1. I have asked for help on the bitlbee irc channel and dx was trying to rewrite the patch: http://ix.io/9RQ but even tho the bitlbee compiles just fine when using it the contacts for gadu-gadu network are not being loaded... I am hoping someone can continue working on the patch from dx till it works again. Maybe even this code could be later (when tested / working) added to the next stable release. It's extremely important for some users.

Thanks in advance.

AndrzejL

comment:4 Changed at 2014-01-15T16:12:45Z by AndrzejL

Errr... nevermind... The patch created by dx works like a charm... I forgot to do few very simple things like...

chown -R bitlbee:bitlbee /var/lib/bitlbee

after re-compiling / installation. I guess wrong permissions were stopping Bitlbee from properly reading the contacts list for gadu-gadu...

also

mkdir /var/run/bitlbee/ chown bitlbee:bitlbee /var/run/bitlbee/

helps to get rid of the:

Jan 15 15:40:39 icsserver.loc bitlbee[10722]: Warning: Unable to bind UNIX socket to /var/run/bitlbee/bitlbee.sock: No such file or directory Jan 15 15:40:39 icsserver.loc bitlbee[10722]: Unable to bind UNIX socket to /var/run/bitlbee/bitlbee.sock: No such file or directory Jan 15 15:40:39 icsserver.loc bitlbee[10722]: Warning: Warning: Couldn't write PID to `/var/run/bitlbee/bitlbee.pid' Jan 15 15:40:39 icsserver.loc bitlbee[10722]: Warning: Couldn't write PID to `/var/run/bitlbee/bitlbee.pid'

HOORAY FOR DX! Thank You for Your time for Your help and for Your patience for my stupidity...

Kind regards.

Andrzej

P.S. For Arch Linux users that want to use Bilbee with libpurple (patched so it retains gadu-gadu contacts) without X on their machine (minimal install of libpurple) here are my (well not mine as they were not written / created by myself but assembled from someone else work and only modified by me when needed) PKGBUILDS that will make the job of compiling / installing much easier...

http://andrzejl.cyryl.net/AndrzejL/Files/PKGBUILD/libpurple-minimal.tar.gz http://andrzejl.cyryl.net/AndrzejL/Files/PKGBUILD/bitlbee-libpurple.tar.gz

Here is also Arch Wiki link that will help to setup Bitlbee correctly.

https://wiki.archlinux.org/index.php/bitlbee

Changed at 2014-01-15T23:53:57Z by dx

The patch updated to 3.2.1

comment:5 Changed at 2014-02-04T05:37:18Z by dx

Keywords: patch added

comment:6 Changed at 2014-06-21T11:38:08Z by robert@…

Even the patch might work for Gadu-Gadu, it is unfortunately not generic enough. Just adding WhatsApp to that list in the patch makes BitlBee segfaulting after adding at least one WhatsApp contact, saving and reconnecting to WhatsApp. Given that WhatsApp (via libpurple) works fine in Pidgin and BitlBee without this patch, it brings the assumption that account_on() might be the wrong place (too early). On IRC dx raised the idea of using imcb_connected() instead while I wildly guessed about prplcb_conn_connected(). However my C is too bad to perform these changes even for testing purposes - however I am happy to test such changes if somebody provides me an experimental patch.

comment:7 Changed at 2014-09-27T14:37:38Z by dx

Keywords: patch removed

Gadugadu patch applied in rev 1036. Whatsapp side of it, well, still pending. Sorry for that.

Changed at 2015-01-23T20:10:32Z by dx

here's the fix for the whatsapp side, will upstream it soon™ (and yes it turned out to be what i said about imcb_connected, yes i know it took too long, don't look at me that way)

comment:8 Changed at 2015-01-23T20:10:45Z by dx

Owner: set to dx
Status: newaccepted

comment:9 Changed at 2015-11-01T07:46:45Z by dx

Resolution: fixed
Status: acceptedclosed

This stuff was applied months ago, forgot to close it.

Modify Ticket

Action
as closed The owner will remain dx.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.