GNOME Bugzilla – Bug 162619
Subscription requests dropped
Last modified: 2005-05-05 14:52:20 UTC
Subscription requests needs to be handled.
Created attachment 36729 [details] [review] Patch to fix this bug. Tested this with auth'ing, denying and adding contacts and it seems to work in the same fashion it did before.
Just noticed actually, that it uses gossip_jabber_ functions for the subscribed and unsubscribed calls. Perhaps we need gossip_protocol_send_ functions for the subscribed and unsubscribed API to be abstract across all potential protocols?
Created attachment 36734 [details] [review] Improved on the first patch. This simply adds a layer of abstraction. The first patch called gossip_jabber_send_subscribed or gossip_jabber_send_unsubscribed from the dialog (in the gossip_app module) which shouldn't know about Jabber. Instead now we call gossip_protocol_contact_subscribed (...) and each protocol can have its own way of dealing with subscription accepting/denying.
Created attachment 39681 [details] [review] Updated to the lastest HEAD; fixes currently borked adding/removing contacts.
I think the call gossip_protocol_contact_subscribed is a bit weird. This should probably be something like gossip_protocol_add_contact and _remove_contact. The signal name should be changed to subscription_request and the signal handler should return Yes, No or Deferred (don't want to answer this now). I also think we shold do a bit more than we used to before signalling the UI. When we get a subscription request we should first ask for the vCard of the contact that wants to add us. When we get that vCard, information that it's not available or a timeout we signal the request together with the vCard (or NULL). Then we can show that vCard in the UI together with the subscription request. In gossip-app.c you can use g_signal_handlers_disconnect_by_func instnead of calling g_signal_handler_find and then g_signal_handler_disconnect.
Created attachment 45860 [details] [review] Updated patch. OK: gossip_protocol_add_contact() and gossip_protocol_remove_contact() are already taken so you can't use them :P I have changed the subscription event to "subscription_request". The signal handler does *not* return Yes No or Deferred because otherwise I guess you would have to use gtk_dialog_run() and do a synchronous vCard lookup. Is this still what you want or has your moment of madness past? :D Now uses g_signal_handlers_disconnect_by_func() as request. The vCard is now (design #4) used to present the user with a name not just a Jabber ID as we discussed here (screenshots included): http://developer.imendio.com/wiki/Scratchpad/Gossip/Subscription_Dialog
Hi, Do you think you could update this patch to be against the structure? Otherwise I'll get around to try to make it happen at some point, it'd just save me some time.
Yea, I'll do it :)
Created attachment 45899 [details] [review] Reworked to fit in with the new code reorg. This patch was updated to work with the new libgossip code reorg and adds to the original patch: * Now if the contact is not on your list they are added without showing the Add Contact dialog. * All contacts are now GOSSIP_CONTACT_TYPE_TEMPORARY by default and specifically set otherwise.
Commited to CVS. Did one change and changed the name gossip_protocol_contact_subscribed to gossip_protocol_contact_set_subscription.