Hi Mateus, The question is sounds similar to [1].
I replied personally to you, instead of to the list, so I will quote myself: On Sun, Jun 5, 2016 at 1:42 AM, Alexandr Akulich <akulichalexan...@gmail.com> wrote: > Hi Mateus. > > I know about this behaviour. Empathy wants to get know if the typed > contact is valid and exists. Telepathy have no such API, so Empathy > has to workaround it via trying to get info about the contact by typed > identifier, which (usually) triggers handle assignment, or results in > "InvalidHandle" error. > > The thing is that ensureHandle() does (or at least should) NOT add the > identifier to the contact list. 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. On Sun, Jun 5, 2016 at 2:18 AM, Mateus Bellomo <mateusbell...@gmail.com> wrote: > The problem is while I'm typing the identifier of a contact to add, the > function requestHandles() is being called several times: > > Let's say I wan to add a contact mate...@ws.sip5060.net. While I'm typing, > the function requestHandles() is being called at least 2 times before I hit > enter so the contacts actually added would be (possibly): > > mateus2@w > mate...@ws.sip5060.net > > In this case I have a wrong list after I hit enter because there could be a > lot of contacts that don't even are a real contact. > On Sun, Jun 5, 2016 at 2:32 AM, Alexandr Akulich <akulichalexan...@gmail.com> wrote: > Empathy shows list of all known contacts. While you typing the > identifier, empathy asks the CM: "is this contact valid?" CM answers: > "yes, it's valid" and then Empathy adds the contact to the list. It's > not the user-controllable "contact list", but something like list of > contacts, referenced in current session. > > I would suggest to ask Empathy devs on this regard. > > IIRC KDE Telepathy works differently — it just doesn't check > identifier while user typing. I'm going to suggest it again: ask Empathy developers. [1] https://lists.freedesktop.org/archives/telepathy/2016-June/006919.html On Mon, Sep 19, 2016 at 10:59 PM, Mateus Bellomo <mateusbell...@gmail.com> 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@test.s > mateus2@test.sip5060 > mate...@test.sip5060.net > > I'm wondering if this behaviour should be expected from telepathy or it's > just a bug. > > Any help would be greatly appreciated. > > Thanks! > > > [1] https://github.com/resiprocate/resiprocate/tree/master/apps/telepathy > [2] > https://github.com/resiprocate/resiprocate/blob/master/apps/telepathy/Connection.hxx#L104 > [3] > https://github.com/resiprocate/resiprocate/blob/master/apps/telepathy/Connection.hxx#L105 > > _______________________________________________ > telepathy mailing list > telepathy@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/telepathy > _______________________________________________ telepathy mailing list telepathy@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/telepathy