-
Zash
https://www.rfc-editor.org/info/rfc9413 Maintaining Robust Protocols Might be worth a look when I'm awake.
-
MattJ
edhelas, IIRC you were interested in hats: https://github.com/xsf/xeps/pull/1285
-
edhelas
MattJ 💕
-
Seve
Cool!
-
edhelas
Now lets implement that in XMPP servers :3 !
-
MattJ
https://hg.prosody.im/0.12/file/tip/plugins/muc/hats.lib.lua :)
-
edhelas
Looks like I'll have to open a ticket for ejabberd ?
-
MattJ
IIRC someone told me they were implementing the same syntax
-
edhelas
"someone"
-
MattJ
The real question (not addressed by this XEP update) is exactly how hats get assigned
-
edhelas
To me something like like "only admins/owners" can do it seems doable. And then you let bots taking care of it.
-
pep.
why bots?
-
edhelas
Discord is doing it this way, and it leaves all the complexity to the implementers.
-
MattJ
edhelas, who defines the hats?
-
edhelas
Well admins as well ?
-
MattJ
Then we need some kind of protocol for that
-
edhelas
Time to do PEP over MUC :3 ?
-
edhelas
<iq type='set' to='xsf@muc.xmpp.org' id='publish1'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <publish node='urn:xmpp:hats:0'> <item id='host'> <hat title='Host' uri='http://schemas.example.com/hats#host' xml:lang='en-us'> <badge xmlns="urn:example:badges" fgcolor="#000000" bgcolor="#58C5BA" /> </hat> </item> </publish> </pubsub> </iq>
-
singpolyma
> Then we need some kind of protocol for that I have a protocol for you ;) ↺
-
MattJ
Of course :)
-
lovetox
really colors?
-
MattJ
lovetox, it's a common aspect of this feature in other platforms, so yeah
-
lovetox
and they can define the colors themself?
-
lovetox
as in the user
-
lovetox
but i guess why not
-
lovetox
so whats the idea, to store the metadata like color somewhere else, and only send a reference in the presence?
-
lovetox
ah no its in the presence
-
lovetox
so why pubsub?
-
lovetox
to store what hats are allowed in a room✎ -
lovetox
to store what hats are allowed in a room? ✏
-
MattJ
Yes
-
edhelas
We might have a specific namespaces for colors
-
edhelas
So it can be reused in other XEPs, Hats might not be the only case where we might need it
-
lovetox
sounds overengineered, security labels use colors since forever
-
lovetox
why the uris?
-
lovetox
whats the idea behind that?
-
lovetox
maybe i missed it, but there is no flow to remove a hat
-
MattJ
The URIs allow uniquely identifying a hat
-
lovetox
the title does also
-
lovetox
or lets say it could
-
MattJ
No, because the title might be translated, for example
-
lovetox
haha
-
lovetox
would be a first
-
lovetox
who does the translating ? the Admin?
-
MattJ
Doesn't matter
-
lovetox
in what situation do i need to identify a hat by its uri?
-
MattJ
You don't *need* to, which is why there is a title
-
MattJ
Clients can just ignore the URI for display purposes, and render the title
-
MattJ
But they may understand the URI, and apply some special meaning
-
lovetox
its more and more like a security label for presence
-
MattJ
Maybe, I can see similarities
-
lovetox
has a label/uri which we can ignore, and a displaymarking/title/color which we display :D
-
lovetox
presence is of course a problem
-
lovetox
should you not go full security label, and attach the hat to the message?
-
lovetox
i mean the server
-
lovetox
otherwise MAM etc will be a problem
-
MattJ
Then how would you discover the hats of people who haven't written a message?
-
lovetox
maybe additional?
-
lovetox
not instead
-
MattJ
Sure, possibly
-
MattJ
We have occupant-id and stuff for that though already, right?
-
lovetox
hmmm .. meh thats a can of worms
-
lovetox
so i receive presence, and then attach a hat retroactively to past messages i receive?
-
lovetox
nah it should be independent of presence in my opinion
-
MattJ
Hats are associated with users, not messages
-
MattJ
Think of them as extended affiliations
-
lovetox
are affiliations not added to MUC MAM messages?
-
MattJ
I don't think so?
-
lovetox
examples in the MAM XEP sure look like it
-
MattJ
> In the case of non-anonymous rooms or if the recipient of the MUC archive has the right to access the sender real JID at the time of the query, the archive message will use extended message information in an <x/> element qualified by the 'http://jabber.org/protocol/muc#user' namespace and containing an <item/> child with a 'jid' attribute specifying the occupant's full JID, as defined for non-anonymous room presence in Multi-User Chat (XEP-0045) [11]. Indeed.
-
lovetox
if you only add it to presence, my GUI would only add it to the roster
-
lovetox
MUC roster is mostly hidden for most users
-
lovetox
When i read about the XEP i thought, ok i add a "Teacher" badge to each message
-
lovetox
because so people know the messages comes from the Teacher
-
lovetox
So my GUI would attach hats to messages
-
lovetox
don’t know how other im solutions use hats
-
lovetox
if its just a "user can look it up if he wants in the roster" kind of thing, i would not find it that useful
-
lovetox
Also this attaching it to messages makes it more flexibel, when presence is not broadcasted, for example big MUCs
-
lovetox
And then it would be a security label without the security :D
-
lovetox
the diff is subtle, with sec labels i can add different to each message, which would not be the case here