Opened 8 years ago

Closed 5 years ago

Last modified 5 years ago

#9463 closed enhancement (fixed)

Gadu Gadu prpl - contacts list synchronisation with server

Reported by: kkszysiu Owned by: tomkiewicz
Milestone: 3.0.0 Component: Gadu-Gadu
Version: 2.10.4 Keywords: roster synchronization
Cc:

Description (last modified by darkrain42)

This patch implements contacts list synchronisation with GG server.

Attachments (1)

gg_server_synchronisation.patch (2.7 KB) - added by kkszysiu 8 years ago.

Download all attachments as: .zip

Change History (17)

Changed 8 years ago by kkszysiu

comment:1 Changed 8 years ago by darkrain42

  • Milestone set to Patches Needing Review

comment:2 Changed 8 years ago by resiak

  • Milestone changed from Patches Needing Review to Patches Needing Improvement

is_successful = (gint *) gg_userlist_request(info->session, GG_USERLIST_GET, NULL);

This is wrong: why are you casting an int to a pointer to an int?

if(is_successful == 0) {

purple_notify_info(gc, NULL,

_("Buddy list downloaded"), _("Your buddy list was downloaded from the server."));

}

This isn't true: the GET request has been sent to the server, but a reply hasn't arrived yet.

Why is a notification needed for PUT or SET at all? I'd be really annoyed if a dialog box popped up every time I signed in or added/removed a contact.

I think gg_userlist_request(info->session, GG_USERLIST_PUT, NULL); actually deletes the buddy list from the server (based on that being what ggp_action_buddylist_delete calls). I think you should be calling the current body of ggp_action_buddylist_put() when you want to save the buddy list to the server.

And, having made the buddy list automatically sync itself, you should remove the corresponding prpl actions.

comment:3 Changed 8 years ago by darkrain42

Ticket #9724 has been marked as a duplicate of this ticket.

comment:4 Changed 8 years ago by neo

I tried to fix this issues. But unfortunately I only get segfault even when compiling only with above patch applied. Can anyone have a look at it?

We've functions like this:

ggp_action_buddylist_get(PurplePluginAction? *action) ggp_action_buddylist_put(PurplePluginAction? *action)

which I think we should use somewhere near that patched lines. However I don't know how to get it works.

comment:5 Changed 8 years ago by kkszysiu

Neo, Ill fixed it and have patches on my local machine but it's not good patch. GG server have timeut for that so you will can add/remove just one contact for couple minutes. Thats bad :/ Another thing it is not GaduGadu?-like. As I know GaduGadu? doesnt automatically synchronize contacts with server. I've abaddoned this patch some time ago :)

comment:6 Changed 8 years ago by kkszysiu

  • Description modified (diff)
  • Type changed from patch to rejected_patch

comment:7 Changed 8 years ago by darkrain42

  • Description modified (diff)
  • Keywords changed from gadu, gg server, sync, synchronisation to gadu gg server sync synchronisation

comment:8 Changed 8 years ago by neo

I'm not pleased to hear that. So I'll try to to sync my contacts vide dropbox or something like that.

I also thought about using jabber server to store my gadu-gadu buddies. Unfortunately I'm not pidgin hacker but I'll try.

comment:9 Changed 8 years ago by kkszysiu

But for what? Its not easier to click from Pidgin in Accounts -> choose your GG account and click on Export my contacts list into server? You can import it using "Import my contacts list from server".

comment:10 Changed 8 years ago by MarkS

I believe Adium already does this since changeset 18545. Thought I let you know. I haven't had any issues with Adium, which uses libpurple.

#3593

#10130

comment:11 Changed 8 years ago by rekkanoryo

Hmm, this patch seems to have fallen off my radar. Sorry about that.

What I'd like to see is for libpurple to automatically update the server with our changes to the buddy list, as it's done in other protocols. I realize this isn't necessarily how other clients handle it, but this is one of the areas where all our included prpls should be have consistently when possible. (If I misread this patch's intention and it does what I said here or our prpl already does that, I apologize.)

comment:12 Changed 6 years ago by tomkiewicz

New GG10 protocol provides better solution - synchronized userlist.

Documented here (in Polish): http://toxygen.net/libgadu/doc/group__importexport.html#gac963e10f462185248412205132d73db http://toxygen.net/libgadu/protocol/#ch1.15

But if we want to use this, we have to add zlib to dependencies.

comment:13 Changed 6 years ago by tomkiewicz

As I found out in #8161, most probably there is no possibility to implement buddy list synchronization based on old contact list format. The only way is GG10 protocol.

comment:14 Changed 5 years ago by tomkiewicz

  • Keywords synchronization added; gadu gg server sync synchronisation removed
  • Owner changed from bartosz to tomkiewicz
  • Version changed from 2.5.7 to 2.10.4

comment:15 Changed 5 years ago by tomkiewicz

  • Keywords roster added
  • Milestone changed from Patches Needing Improvement to 3.0.0
  • Resolution set to fixed
  • Status changed from new to closed
  • Type changed from rejected_patch to enhancement

Fixed by 33098:63bf52ec9e1e

comment:16 Changed 5 years ago by Tomasz Wasilczyk <tomkiewicz@…>

(In [63bf52ec9e1e]):
Gadu-Gadu: roster - tidying. Fixes #9463

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!