-
Schimon
Good day. This is a matter which is not directly related to development. I want to add references to XMPP PubSub projects in a "help" page. Where do you think it would best fit at?
-
Schimon
https://xmpp.pimux.de/file_share/19504dea-47b3-4573-bdaf-846026ab0a9d/libervia_and_movim.png
-
Schimon
Should Libervia and Movim be under "XMPP" rather than "Friends"?✎ -
Schimon
Should Libervia and Movim be under "About" or "XMPP" rather than "Friends"? ✏
-
nicoco__
If I cache BoB data, should I cache by the (jid, cid) couple or should I consider the cid unique enough?✎ -
nicoco__
~If~ When I cache BoB data, should I cache by the (jid, cid) couple or should I consider the cid unique enough? ✏
-
singpolyma
Up to you. I store all media by hash alone even if it didn't come by bob
-
nicoco__
Which hash algo do you use and how do you handle the case where the CID does not use the same hash algo you use?
-
singpolyma
I use multiple and I refuse Cids with an unknown algorithm since I can't verify them
-
nicoco__
I see, thanks. What's a reasonable list of hash algorithms to use?
-
nicoco__
ie, what do _you_use ^^
-
singpolyma
I use sha1 (for compatibility, I'd like to remove it eventually) sha256, sha512. I'm considering removing sha512 and adding sha3
-
nicoco__
maybe I should just use the list of XEP-0300?
-
nicoco__
that's probably too long, I'll do like because I have no personality
-
seil
Is there no standard for user activity state (active, away, xa, dnd, unavailable etc)? I'm currently getting all presence messages like normal but different clients seem to send presence differently (oversimplified but Conversations.im sends `<idle/>` and Gajim sends `<show><idle></show`>)
-
nicoco__
seil: as of now, every client ("resource") sets his presence independantly. a new XEP about this has been discussed a few times, but no one did it yet.
-
seil
> seil: as of now, every client ("resource") sets his presence independantly. a new XEP about this has been discussed a few times, but no one did it yet. what's the xep? ↺
-
seil
and is there any "good enough" solution at the moment?
-
nicoco__
the new one that does not exist yet? lol
-
nicoco__
> and is there any "good enough" solution at the moment? yes, lemme find you how gajim merges conflicting presences ↺
👍 1 -
seil
> the new one that does not exist yet? lol I've seen a couple proposed XEPs in the directory ↺
-
nicoco__
oh well it's not as readable as I thought it would be
-
nicoco__
https://dev.gajim.org/gajim/gajim/-/blob/master/gajim/common/modules/contacts.py#L432
-
nicoco__
you need https://dev.gajim.org/gajim/python-nbxmpp/-/blob/master/nbxmpp/const.py?ref_type=heads#L153
-
nicoco__
to understand
-
seil
That's fine, I'll get it eventually 🤣
-
wgreenhouse
my understanding is you should show the presence of the highest-priority client, or the "most online" if there are multiple presences at same priority
-
nicoco__
can someone try if the sha1 in https://xmpp.org/extensions/xep-0231.html#example-3 matched the base64-encoded data?
-
wgreenhouse
but maybe that's a gross oversimplification
-
nicoco__
I find 4b97ce7f0f06a0e05999f3c719cd5b4f3da992a7 vs 8f35fef110ffc5df08d579a50083ff9308fb6242 but I wonder if I did things right…
-
nicoco__
my snippet in python is: ```python import base64 import hashlib print(hashlib.sha1(base64.b64decode("iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg==")).hexdigest()) ```
-
nicoco__
(examples are not normative, I know)
-
moparisthebest
nicoco__: I get the same result as you using base64 -d | sha1sum, want to make an MR ? :)
-
singpolyma
> my understanding is you should show the presence of the highest-priority client, or the "most online" if there are multiple presences at same priority Correct. And if you want something similar but account wide we have xeps covering this, the most obvious one being User Activity ↺
-
seil
Thank you
-
nicoco__
> nicoco__: I get the same result as you using base64 -d | sha1sum, want to make an MR ? :) thanks OK, so it turns out I'm able to use the python standard lib. No MR, this is actually a case to handle I guess, mismatching CID and content :P ↺