telepathyClient: call delay on context when approving a FT or call

Not doing so is considered as a bug as we don't accept the context right away.
It leads to tp-glib returning directly from the AddDispatchOperation() D-Bus
call and so automatically approve the channel if the Shell is the only
approver running.

https://bugzilla.gnome.org/show_bug.cgi?id=660084
This commit is contained in:
Guillaume Desmottes 2011-09-26 10:51:10 +02:00
parent 0191cc589a
commit 00384ccb47

View File

@ -305,6 +305,8 @@ Client.prototype = {
Shell.get_tp_contacts(conn, [targetHandle],
contactFeatures,
Lang.bind(this, this._createAudioVideoSource, channel, context, dispatchOp));
context.delay();
},
_createAudioVideoSource: function(connection, contacts, failed, channel, context, dispatchOp) {
@ -338,6 +340,8 @@ Client.prototype = {
Shell.get_tp_contacts(conn, [targetHandle],
contactFeatures,
Lang.bind(this, this._createFileTransferSource, channel, context, dispatchOp));
context.delay();
},
_createFileTransferSource: function(connection, contacts, failed, channel, context, dispatchOp) {