-
lovetox
is there ever a reason a groupchat sends me a type "chat" message from its bare jid?
-
pep.
It wants to talk to you!
-
pep.
captcha or stuff like that? :/
-
lovetox
but this would not be type "chat"
-
pep.
Why not
-
pep.
Does it have to happen in the room (even if not broadcasted to the others)
-
lovetox
a message not sent in a room is not automatically type chat
-
lovetox
there is also type "normal" which is commonly used for everything by a groupchat which is not a broadcasted message
-
lovetox
the rfc intends type=chat for human one to one chat sessions
-
pep.
Does the RFC define human? (/s)
-
lovetox
so i go ahead and assume sending a type=chat message which didnt originate from a human interaction is a violation or at least very bad style
-
pep.
Normal will render differently on some apps though no?
-
pep.
Wasn't gajim actually that had a different UI for them?✎ -
pep.
Wasn't it gajim actually that had a different UI for them? ✏
-
lovetox
in ancient times
-
lovetox
currently it does not differentiate between them
-
pep.
Ok
-
lovetox
one of the biggest problems in XMPP i try to deal with since years is the question when i receive something: What is this JID?
-
lovetox
is it a groupchat, a account, a pm, a gateway
-
pep.
"disco it"?
-
Ge0rG
yeah, keep a FIFO queue of disco-unknown stanzas per JID that will be processed once the disco has been responded to. Also good luck with timeouts.
-
pep.
I get that it's not exactly optimal to have to wait a network round-trip to choose the UI
-
pep.
But it'll be the most accurate answer you'll be able to get I guess
-
pep.
If you can't already deduce from the URI (if it's not just a JID)
-
Ge0rG
With MUCs, the naive hope is that you won't receive traffic from a JID you didn't ask before.
-
Ge0rG
Except with the super-weird corner case of MUC-PMs
-
pep.
"corner case" :P
-
Ge0rG
Which is why, a few years ago, I insistet on everbody adding <x muc/> elements into each passed PM
-
Ge0rG
pep.: you'll only get unsolicited MUC-PMs as carbons from your own server, which should know better
-
Ge0rG
> - A private <message/> from a local user to a MUC participant (sent to a full JID) SHOULD be carbon-copied This is a bummer, of course
-
MattJ
lovetox, did you receive such a stanza, or you just want assurance it would never happen?
-
MattJ
I'd agree that it seems like something that shouldn't happen
-
Ge0rG
type=chat from a MUC bare JID? I'm pretty sure there are captcha solutions doing that, maybe also room mode changes on irc bridges
-
Ge0rG
oh no, mode changes from biboumi are type=groupchat from=bare
-
MattJ
type=groupchat from=bare is something clients should support
-
MattJ
("because I said so")
-
MattJ
It used to be commonly supported in clients, before XEP-0045. We have better ways to convey the information it was previously used for, but it's still handy for announcements and things.
-
lovetox
no i did not receive something like that
-
lovetox
i just want to determine as early as possible that im not dealing with a groupchat
-
lovetox
but seems this is doomed to fail
-
lovetox
Ge0rG, your proposal seems not thought trough
-
lovetox
seems to invite high complexity not worth it
-
lovetox
i would be suprised if anyone implemented such a thing in reality
-
Ge0rG
lovetox: surprise!
-
pep.
Actually many do
-
lovetox
yeah please name the project
-
lovetox
i want to look into it
-
pep.
It's kinda the only way to distinguish certain payloads
-
pep.
poezio for one
-
lovetox
just to be sure pep. before i go look
-
Ge0rG
lovetox: https://lab.louiz.org/poezio/poezio/-/blob/main/poezio/core/handlers.py#L162-174
-
lovetox
im not talking about "disco a jid"
-
lovetox
im talking about not processing stanzas, until a disco result is received
-
Ge0rG
lovetox: yes, poezio
-
pep.
ah
-
Ge0rG
it's waiting for the disco to resolve before processing
-
pep.
Ah yes
-
Ge0rG
I think it will even queue all messages from that JID on the has_identity semaphore.
-
pep.
(Ge0rG knows better..)
-
Ge0rG
well, that was what one of the developers claimed
-
Ge0rG
lovetox: also regardless of what other implementations do, it's the only way to correctly handle the situation.
-
lovetox
hm for this particular case, no
-
lovetox
the correct way to handle this is, if its not marked as muc pm, drop the message
-
Ge0rG
the particular use case is: you receive a message from a JID you don't know
-
Ge0rG
lovetox: "drop the message" is almost never the correct solution
-
lovetox
seems poezio does this only for carbons
-
lovetox
sooo ... what does it do when it receives a muc pm over mam?
-
pep.
https://lab.louiz.org/poezio/poezio/-/blob/main/poezio/core/handlers.py#L264-275
-
pep.
I'd assume it takes this path
-
pep.
MAM messages should be replayed as normal messages I think, with some tweaks
-
lovetox
in your link i dont see a disco
-
pep.
I don't know this codepath much. I guess there should be one, maybe it's just that we encounter this issue less often and we haven't added it yet?
-
pep.
If you want you can try to craft a payload and send to my jid I'll tell you what we do :P
-
lovetox
i think we can conclude that there is no general architecture in poezio that says we handle stanzas only after a disco.
-
lovetox
i think in xmpp it was never needed to disco a contact
-
lovetox
you receive something from a jid, look at the type, and open a chat
-
lovetox
you dont care if its a groupchat or normal chat, or a gateway
-
pep.
fwiw my comment above was because you asked how to know what the jid refers to
-
pep.
Sure there are cases you don't really care and you display a generic tab
-
lovetox
yes, and that seem to be my fault, i thought, hey lets write code under the assumption we always know what a JID is
-
lovetox
seems the smarter way is, write code that does not care what a JID is
-
lovetox
you probably should always write at least 2 xmpp clients
-
lovetox
one where you learn everything that does not work, and one where you do it right :D
-
flow
they say the same things about building a house
-
lovetox
maybe we should write such a "Falsehoods XMPP developers believe" article
-
emus
lovetox: If that's meant serious I would support it :-)
-
flow
we should also try to improve the situation when developing new protocols
-
lovetox
did any one ever think about just droping private message altogether
-
lovetox
is it such an essential feature?
-
lovetox
like could we live without it
-
lovetox
does any of the other big messengers has this? whatsapp, telegram, signal, matrix?
-
pep.
I'm not sure Gajim could live without it. But something like Snikket definitely could
-
MattJ
The problem is that XMPP 1) has public channels and 2) tries to keep participant identitifiers hidden in such channels
-
MattJ
Pretty much all other platforms either don't do public channels, or don't hide identifiers
-
MattJ
But in this context only are MUC PMs useful. But it's not impossible to find a better alternative at the protocol level.
-
lovetox
i guess its half ok now with everyone adding the identifier that its a muc pm
-
lovetox
it was total insanity before
-
lovetox
the problem is also that i nowhere care about resources anymore
-
lovetox
like for a normal chat message, i cast it to bare, i dont save the resource or do anything with it
-
lovetox
aynway other topic
-
lovetox
corrections, if i correct a message, then it replaces the other one
-
lovetox
how does this work with stuff like receipts and chat markers
-
lovetox
say i send a message, and then i correct it
-
lovetox
do i expect to get a receipt/chatmarker with the message id for the correction?
-
lovetox
or with the message id from the original message?
-
adx
is there some mechanism that allows MAM queries to be handled from some other entity? so far i only found xep-0442, but it doesn't seem to be implemented anywhere