Beagle ask for both vcard-4.0 and vcard-temp at the same time (#283)
Closed
wojciech.kapcia@tigase.net opened 4 years ago

Lets start with BeagleIM, it first tries to get VCard4 then if that fails goes to VCardTemp.

From what I can see in Beagle logs it ask for both at the same time and not as you explained (which also may be intentional to get all possible responses as quick as possible):

<!--   2020-09-03T16:17:39Z   >>>>   -->
<iq to='conversations@conference.siacs.eu/briest' id='6539A68C-2FF0-4790-894B-C5944D970921' type='get'>
<vcard xmlns='urn:ietf:params:xml:ns:vcard-4.0'/>
</iq>

<!--   2020-09-03T16:17:39Z   >>>>   -->
<iq id='50BEAEBC-A381-4E3B-A3BE-C73CBB86A0FE' type='get' to='conversations@conference.siacs.eu/briest'>
<vCard xmlns='vcard-temp'/>
</iq>

Receives response for vcard-temp:

<!--   2020-09-03T16:17:39Z   <<<<   -->
<iq type='result' from='pinky@njs.netlab.cz' id='6E132EB7-1F5F-4875-8A1B-A7058C65AC3F' to='wojtek@tigase.org/1702398793-tigase-5' xmlns='jabber:client'>
<vCard xmlns='vcard-temp'>
<PHOTO>
<BINVAL>iVBORw0KGgoAAAAN8w1wSwXsfhLsxZy/B00NagsmuK89COlXKOkp91hoIe2vtLKs/uvGgOqQpht3XH3gf8X+K2iLBf+v44AAAAASUVORK5CYII=</BINVAL>
<TYPE>image/png</TYPE>
</PHOTO>
<FN>Test</FN>
</vCard>
</iq>

And at the end receives response for vcard4

<!--   2020-09-03T16:18:10Z   <<<<   -->
<iq xmlns='jabber:client' to='wojtek@tigase.org/1702398793-tigase-5' type='error' from='conversations@conference.siacs.eu/briest' id='6539A68C-2FF0-4790-894B-C5944D970921'>
<error type='cancel'>
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>

Do we want to change that? (If not then simple "wontfix" will do)


However, if that is the vcard which avatar is not saved Beagle could retry to fetch it (hoping that it will get it). Next presence from the same user would actually retrigger this flow, so dump like that is expected (at least by me).

I checked other logs and there are indeed multiple presences from this user. Interestingly enough there are also 404/wait/timeouts:


<!--   2020-09-02T15:53:39Z   <<<<   -->
<iq from='conversations@conference.siacs.eu/dm1ri' xmlns='jabber:client' to='wojtek@tigase.org/1702398793-tigase-4' id='F137EC8C-8023-47A3-B3E7-83488CCD47CB' type='error'>
<vCard xmlns='vcard-temp'/>
<error code='404' type='wait'>
<recipient-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Request has timed out</text>
</error>
</iq>
Andrzej Wójcik (Tigase) commented 4 years ago

Those timeouts may be connected to slow s2s which we are discussing in #servers-319 (a lot of data, slow and inefficient networking due to small buffers)

Andrzej Wójcik (Tigase) commented 4 years ago

I've found a code which was doing something like that (duplicated VCard fetching) but only for MUC occupants. I suppose that this is actually the same and this was fixed while working on #issue #281

wojciech.kapcia@tigase.net commented 4 years ago

It seems to be fixed, though #issue #281 seems to still not be release (QA on you still). On the other hand, I don't see queries for vcard-4.0 now (only my own) but at the same time, only single entity returned error to vcard-temp request (which should yield query for vcard-4.0 - correct?):

<!--   2020-10-05T15:50:28Z   <<<<   -->
<presence from='tigase@muc.tigase.org/Carlo' xmlns='jabber:client' to='wojtek@tigase.org/1009101153-tigase-43'>
<c node='http://jabber.pix-art.de' ver='QtbHXMxK92rzCYyrutpcyqzJc/k=' xmlns='http://jabber.org/protocol/caps' hash='sha-1'/>
<x xmlns='vcard-temp:x:update'>
<photo>7332112c52e6840d10ca7be0919c088f51791a65</photo>
</x>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item role='participant' nick='Carlo' jid='carlo@chat.carlovirtucio.com/Pix-Art Messenger.O_Li' affiliation='none'/>
</x>
</presence>

<!--   2020-10-05T15:50:28Z   >>>>   -->
<iq to='tigase@muc.tigase.org/Carlo' type='get' id='9819F5F0-7974-4C6F-8D27-382487ACD857'>
<vCard xmlns='vcard-temp'/>
</iq>

<!--   2020-10-05T15:50:29Z   <<<<   -->
<iq xmlns='jabber:client' type='error' from='tigase@muc.tigase.org/Carlo' to='wojtek@tigase.org/1009101153-tigase-43' id='9819F5F0-7974-4C6F-8D27-382487ACD857'>
<error type='cancel'>
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
Andrzej Wójcik (Tigase) commented 4 years ago

I've changed behaviour of BeagleIM/SiskinIM in terms of VCard and presence photo hash. If I receive a presence with photo hash I'm only querying vcard-temp for MUC - no VCard4 query for MUC occupants. This is intentional as photo hash is related only to the photo within vcard-temp.

Moreover, VCard4 changes are published via pubsub and not via presence photo hash, so there is no point to query VCard4 for MUC occupants.

issue 1 of 1
Type
Question
Priority
Normal
Assignee
Version
4.1
Spent time
15m
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/beagle-im#283
Please wait...
Page is in error, reload to recover