Bug 28423 - Conn.I.Blocking: replacement for the 'deny' ContactList channel
Summary: Conn.I.Blocking: replacement for the 'deny' ContactList channel
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: git master
Hardware: Other All
: low enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard:
Keywords: patch
Depends on:
Blocks: CommPolicy
  Show dependency treegraph
 
Reported: 2010-06-07 08:40 UTC by Simon McVittie
Modified: 2011-03-16 18:14 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2010-06-07 08:40:41 UTC
When Chan.I.ContactList is replaced with Conn.I.ContactList and Conn.I.ContactGroups, we need a replacement for the old 'deny' channel. This spec branch is my proposal: it's a straightforward replacement for 'deny'.

Git:

http://git.collabora.co.uk/?p=user/smcv/telepathy-spec-smcv.git;a=shortlog;h=refs/heads/blocking

HTML:

http://people.freedesktop.org/~smcv/telepathy-spec-blocking/spec/org.freedesktop.Telepathy.Connection.Interface.ContactBlocking.DRAFT.html

This would be trivial to implement in telepathy-glib using TpBaseContactList (Bug #28200).

Potential problems:

* Do we care about protocols where you can look at the block list but not edit it? My assumption is "no".

* Do we support protocols/CMs where you can block people at runtime (or do pseudo-blocking in the CM) but the changes aren't stored on the server? My assumption is "no".

See also Bug #24908, which requests the ability to change the blocking policy from default-allow to default-deny. That feature is currently out of scope for this bug,  but we could easily add it to the Blocking interface later.
Comment 1 Simon McVittie 2010-11-24 09:18:38 UTC
RequestBlockedContacts is no longer desirable to have: it has the same problems that RequestContactListAttributes did. It should be GetBlockedContacts.
Comment 2 Danielle Madeley 2010-12-01 20:11:00 UTC
Few thoughts on this:

Should BlockedContacts be a property instead of the method GetBlockedContacts() ?

Should the interface require implementing Conn.I.ContactList like Conn.I.ContactGroups does?

(In reply to comment #0)

> * Do we care about protocols where you can look at the block list but not edit
> it? My assumption is "no".

Do any such protocols exist? To my mind it's not useful to the client if it can't be edited anyway.

> * Do we support protocols/CMs where you can block people at runtime (or do
> pseudo-blocking in the CM) but the changes aren't stored on the server? My
> assumption is "no".

I agree, I don't think we want that. It's only going to be confusing to the user when her changes don't persist between connections.

If someone did want such a feature in their CM, they could always choose to implement the interface, and maintain their own blocked-list as a file on disk.
Comment 3 Simon McVittie 2010-12-02 04:20:27 UTC
(In reply to comment #2)
> Few thoughts on this:
> 
> Should BlockedContacts be a property instead of the method GetBlockedContacts()
> ?

Probably not, because it can fail. I think it should have basically the same semantics as GetContactListAttributes in terms of when it can fail, and return the same error that GetContactListAttributes would.

> Should the interface require implementing Conn.I.ContactList like
> Conn.I.ContactGroups does?

Yes, I think so.
Comment 4 Danielle Madeley 2010-12-02 17:52:11 UTC
(In reply to comment #3)

> Probably not, because it can fail. I think it should have basically the same
> semantics as GetContactListAttributes in terms of when it can fail, and return
> the same error that GetContactListAttributes would.

Makes sense.
Comment 5 Danielle Madeley 2011-02-01 15:22:51 UTC
We need the ability to report a contact as abusive to server administrations when we block them.
Comment 7 Sjoerd Simons 2011-02-14 03:03:35 UTC
Some small nitpicks:

* I don't think BlockContacts ([12,3,4], True) should return NotCapable when you can't report abuse on
   the protocol.

If a UI gets as far as to calling BlockContacts then it's basically to late to tell it this doesn't actually works (the user already clicked apply etc). The UI only has three options when this happens:

- It ignores the error, contact not actually blocked, bad
- It throws an error in the users face, bad
- handles the error by calling BlockContacts with abuse= False...

Assuming you can get this far, the last one is least bad way of handling it imho. So better to make that the normal behaviour; If the protocol doesn't support reporting abuse, the value of the abuse parameter is just ignored..

* Maybe the change notification should have a b: Abuse flag as well to indicate what happened?
* Less importnat, do we need a Protocols.Interface.Deny with some capabilities as well ?
Comment 8 Will Thompson 2011-03-08 06:36:56 UTC
I've pinched this from Danni! http://people.freedesktop.org/~wjt/telepathy-spec-blocking/spec/Connection_Interface_Contact_Blocking.html

Review plz? I'm mostly just tidying and answering existing feedback from this bug.

(In reply to comment #7)
> Some small nitpicks:
> 
> * I don't think BlockContacts ([12,3,4], True) should return NotCapable when
> you can't report abuse on
>    the protocol.
> 
> If a UI gets as far as to calling BlockContacts then it's basically to late to
> tell it this doesn't actually works (the user already clicked apply etc). The
> UI only has three options when this happens:
> 
> - It ignores the error, contact not actually blocked, bad
> - It throws an error in the users face, bad
> - handles the error by calling BlockContacts with abuse= False...
> 
> Assuming you can get this far, the last one is least bad way of handling it
> imho. So better to make that the normal behaviour; If the protocol doesn't
> support reporting abuse, the value of the abuse parameter is just ignored..

I agree.

> * Maybe the change notification should have a b: Abuse flag as well to indicate
> what happened?

I don't think this is necessary.

> * Less importnat, do we need a Protocols.Interface.Deny with some capabilities
> as well ?

Not sure this is particularly useful: you can tell whether ContactBlocking is (possibly) supported using <http://telepathy.freedesktop.org/spec/Protocol.html#Property:ConnectionInterfaces>. If  we need to be able to discover whether reporting abuse is supported while the connection's offline, we can add that later.

(In reply to comment #2)
> Should the interface require implementing Conn.I.ContactList like
> Conn.I.ContactGroups does?

I haven't changed this, but I think it makes conceptual sense to require it, even if it's not strictly a prerequisite.

> (In reply to comment #0)
> 
> > * Do we care about protocols where you can look at the block list but not edit
> > it? My assumption is "no".
> 
> Do any such protocols exist? To my mind it's not useful to the client if it
> can't be edited anyway.

I agree.

> > * Do we support protocols/CMs where you can block people at runtime (or do
> > pseudo-blocking in the CM) but the changes aren't stored on the server? My
> > assumption is "no".
> 
> I agree, I don't think we want that. It's only going to be confusing to the
> user when her changes don't persist between connections.
> 
> If someone did want such a feature in their CM, they could always choose to
> implement the interface, and maintain their own blocked-list as a file on disk.

I agree and have added a remark to this effect in the introduction.
Comment 9 Sjoerd Simons 2011-03-08 10:36:42 UTC
Looks good to me ;) go go go
Comment 10 Will Thompson 2011-03-14 12:58:19 UTC
Merged as final for 0.21.13, with some changes: RequestBlockedContacts now returns a{us} and BlockedContactsChanged now uses a{us} for both arguments. That is: rather than just throwing out handles, the CM also signals the contacts' identifiers.


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.