After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 162619 - Subscription requests dropped
Subscription requests dropped
Status: RESOLVED FIXED
Product: gossip
Classification: Deprecated
Component: General
0.8.90
Other Linux
: Normal normal
: 0.9
Assigned To: Gossip Maintainers
Gossip Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-31 15:11 UTC by Mikael Hallendal
Modified: 2005-05-05 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix this bug. (11.73 KB, patch)
2005-01-30 17:27 UTC, Martyn Russell
none Details | Review
Improved on the first patch. (15.92 KB, patch)
2005-01-30 17:48 UTC, Martyn Russell
none Details | Review
Updated to the lastest HEAD; fixes currently borked adding/removing contacts. (16.63 KB, patch)
2005-04-04 19:22 UTC, Martyn Russell
none Details | Review
Updated patch. (29.01 KB, patch)
2005-04-30 13:10 UTC, Martyn Russell
none Details | Review
Reworked to fit in with the new code reorg. (30.58 KB, patch)
2005-05-01 13:15 UTC, Martyn Russell
none Details | Review

Description Mikael Hallendal 2004-12-31 15:11:19 UTC
Subscription requests needs to be handled.
Comment 1 Martyn Russell 2005-01-30 17:27:06 UTC
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.
Comment 2 Martyn Russell 2005-01-30 17:30:13 UTC
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?
Comment 3 Martyn Russell 2005-01-30 17:48:21 UTC
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.
Comment 4 Martyn Russell 2005-04-04 19:22:39 UTC
Created attachment 39681 [details] [review]
Updated to the lastest HEAD; fixes currently borked adding/removing contacts.
Comment 5 Mikael Hallendal 2005-04-08 20:15:04 UTC
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.
Comment 6 Martyn Russell 2005-04-30 13:10:28 UTC
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
Comment 7 Mikael Hallendal 2005-04-30 22:35:08 UTC
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.
Comment 8 Martyn Russell 2005-05-01 10:47:30 UTC
Yea, I'll do it :)
Comment 9 Martyn Russell 2005-05-01 13:15:30 UTC
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.
Comment 10 Mikael Hallendal 2005-05-05 14:52:20 UTC
Commited to CVS.

Did one change and changed the name gossip_protocol_contact_subscribed to 
gossip_protocol_contact_set_subscription.