[Telepathy] requestHandles method

Mateus Bellomo mateusbellomo at gmail.com
Sat Jun 4 21:48:38 UTC 2016


> Do the other connection managers store the handles in persistent storage
somehow?

telepahty-morse store the handles in QMap (like resiprocate) and
telepathy-nonsense in a QPointer<QXmppClient> (even tough the ensure method
access an UniqueHandleMap which I don't know what it is).

But Alexandr was helping me with that (just know I see I was sending the
e-mails directly to him not to the list) and I think I didn't explain the
problem clearly:

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 mateus2 at 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 at w
mateus2 at 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. This is happening
because requestHandles() also call ensureHandle() which add the contact to
the list.

and the answer of Alexandr:

> 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.




2016-06-04 18:35 GMT-03:00 Daniel Pocock <daniel at pocock.pro>:

>
>
> On 04/06/16 21:51, Mateus Bellomo wrote:
> > I was looking to telepathy-morse [1] and telepathy-nonsense [2] and it
> > both don't add a new contact when requestHandles is called so I was
> > wondering if there is a particularity in resiprocate so we have to add a
> > contact when requestHandles is called.
> >
>
> Maybe I did it this way because the initial implementation of
> telepathy-resiprocate didn't have any persistent storage for the contacts
>
> Do the other connection managers store the handles in persistent storage
> somehow?
> _______________________________________________
> telepathy mailing list
> telepathy at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/telepathy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/telepathy/attachments/20160604/bc5ab5d9/attachment.html>


More information about the telepathy mailing list