[Telepathy] requestHandles method behaviour

Mateus Bellomo mateusbellomo at gmail.com
Mon Sep 19 21:28:02 UTC 2016


Thanks for the reply guys and sorry for the duplicated post =)

> The thing is that ensureHandle() does (or at least should) NOT add the
> identifier to the contact list.

When you say list do you also refer to the map that I hold contacts
identifiers and handles, or you refer just the actual list of contacts?

> The RequestHandles method do exactly
> one  thing: returns valid handle for identifier. Error "Invalid
> Handle" should be returned if the given identifier does not identify a
> valid entity of the given type.

Looking at telepathy-nonsense [1] it returns the mapped handle for a
existing contact identifier and I think it will return an empty List if the
contact didn't exist.
But in telepathy-morse [2] it adds the contact to the map if it didn't
exist and then return the List.

So in this case I should do like telepathy-nonsense?

> I'm going to suggest it again: ask Empathy developers.

Is there a specific list for that? I thought this was the correct list.

[1]
https://github.com/TelepathyQt/telepathy-nonsense/blob/master/connection.cc#L728
[2]
https://github.com/TelepathyQt/telepathy-morse/blob/master/connection.cpp#L635

2016-09-19 17:36 GMT-03:00 George Kiagiadakis <gkiagia at tolabaki.gr>:

> On 09/19/2016 08:59 PM, Mateus Bellomo wrote:
> > Hello,
> >
> > I have implemented the requestSubscription() and requestHandles()
> > methods at telepathy-resiprocate [1]. I'm using Empathy as a client and
> > testing it I noticed that when I try to add a contact in the contact
> > list, in the window that opens, the method requestHandle() is being
> > called several times while the user is typing the contact to add. So
> > several 'partial' contacts are being added to my map that holds my
> > contact identifiers [2] [3] like this:
> >
> > mateus
> > mateus2@
> > mateus2 at test.s
> > mateus2 at test.sip5060
> > mateus2 at test.sip5060.net <mailto:mateus2 at test.sip5060.net>
> >
> > I'm wondering if this behaviour should be expected from telepathy or
> > it's just a bug.
>
> It doesn't seem to violate the spec, so I would say it's pretty fine for
> a client to do that. It just needs a way to check if an identifier is a
> valid contact or not and this is the best way to do it. Of course, it
> may generate a lot of d-bus traffic, but I don't think that's causing
> any serious problems.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/telepathy/attachments/20160919/625dec4c/attachment.html>


More information about the telepathy mailing list