Bug 37373 - clarify whether Approvers are called for channels with no Handler
Summary: clarify whether Approvers are called for channels with no Handler
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: git master
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on: 29022
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-19 08:42 UTC by Simon McVittie
Modified: 2019-12-03 20:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2011-05-19 08:42:47 UTC
+++ This bug was initially created as a clone of Bug #29022 +++

By inspection of the source code, if a dispatch operation has no PossibleHandlers, MC doesn't seem to dispatch it to observers or to approvers.

test/twisted/dispatcher/undispatchable.py should create a Text Observer and a Text Approver, and assert whether their methods are called. However, it doesn't.

I think Observers should be invoked for undispatchable operations (rationale: implementing ObserveChannels should be like listening for NewChannels). I'm not so sure about Approvers.

In favour of running Approvers if there's no Handler:

+ consistent with observers

+ maybe the Approver can arrange for a non-service-activatable Handler to be started out-of-band

+ maybe the Approver knows out-of-band that an existing Handler can secretly handle the channel, even though its filter says otherwise (symmetry with the PreferredHandler overriding filters)

Against running Approvers if there's no Handler:

- until now, if the Approver calls HandleChannels("") and gets an error, it's always an error from the Handler; now, HandleChannels("") has to be able to return a specified error that means "actually, I can't do that"

- if the Approver blindly calls HandleChannels(Possible_Handlers[0]), it'll crash itself ("don't do that then" is a reasonable answer)

- Approvers are for interactive approval: is it really appropriate for an interactive approver to pop up if approval is impossible anyway? If you have some UI for "smcv is sending you a file [Save] [Reject]", would it ever make sense for it to pop up to say "smcv is sending you a file but you can't receive it [OK]", and would Approver authors actually deal with this correctly anyway?

(It would be rubbish UI to have a popup that says "smcv is sending you a file [Save] [Reject]", and then when you click Save, have an error message "you can't receive files".)

One possible solution is to let Approvers set a flag for whether they want to be nagged about undispatchable channels, with the default being FALSE (because that's the one that doesn't need the Approver author to take any other special action).
Comment 1 GitLab Migration User 2019-12-03 20:24:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-spec/issues/117.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.