-
lovetox
Ofrom is necessary if you support MUC history , when I remember correctly
-
lovetox
If you only support MAM the it's not necessary
-
lovetox
the reason is that the only way for a MUC to make a real jid known is via presence
-
lovetox
problem is, if a user joins a muc and requests MUC history, the users that generated that history may not be joined anymore
-
lovetox
so how would the MUC make the real jid known
-
lovetox
in come XEP 0033
-
lovetox
when i think about it now, the same thing is probably true for a MAM history request anyway
-
lovetox
ah no MAM has its own mechanism to make the real jid known
-
lovetox
via <x xmlns='http://jabber.org/protocol/muc#user'>✎ -
lovetox
via `<x xmlns='http://jabber.org/protocol/muc#user'>' ✏
-
lovetox
so i think i remember correctly, ofrom is necessary for all servers that offer MUC History, and all clients who implement MUC History
-
lovetox
on that note, i dont know why clients still bother with MUC History
-
lovetox
Gajim removed it since years
-
MattJ
Nice 🙂
-
hari
trollge dei mental✎ -
hari
trollge dei paithiyam ✏
-
MattJ
hari, we've moved on from that incident. Can we help you?
-
hari
Hello MattJ can you explain how client and component connecting in xmpp?
-
MattJ
They both connect to the server. Client connections usually happen over a TCP+TLS stream or over websockets.
-
MattJ
Components usually connect to the server over a local connection from the same machine
-
hari
I have a component named `hari.abc.org` in xmpp server, how can i send a stanza as a anonymous user to that server component?
-
MattJ
<message to="hari.abc.org"><body>Hello world</body><message>
-
MattJ
to="anything@hari.abc.org" will also work
-
hari
How to send stanza from that server to that `anything@hari.abc.org` (client)?
-
edhelas
singpolyma so based on what lovetox said I'm not planning to merge that PR
-
edhelas
Also because it really change how the messages are handled and introduces a few DB requests that will slow things down
-
MattJ
hari: you said hari.abc.org is your component, so the client address must be something else
-
MattJ
When your component receives a stanza, it will have a 'from' address on the stanza, you just send your reply to that address
-
hari
Okay, thank you MattJ
-
singpolyma
edhelas: ok. I will have to prioritize a small fork probably then. Thanks for letting me know
-
edhelas
The performances with your patch will probably not be good at all, it add one, maybe two SQL requests for each messages received.
-
singpolyma
If that is the concern I'm certainly happy to try figuring out how to improve it
-
singpolyma
edhelas: the extra query is to load the contact associated with the message, right? That's the main offender?
-
hari
Hello MattJ ,it sends stanza to the server itself .No stanza sent to the client.
-
MattJ
What type of stanza?
-
hari
Message stanza
-
MattJ
Are you sending to a bare JID (user@example.org) or a full JID (user@example.org/resource)?
-
hari
full jid
-
MattJ
Then it should work fine, if the client is connected
-
MattJ
You are sending to exactly the same JID you received the message from?
-
hari
` this.xmpp.on("stanza", async (data) => { const message = xml( "message", { type: "chat", from: "hari.abc.org", to: data.attrs.from }, xml("body", {}, "Hello People") ); await this.xmpp.send(message); } ` Like this
-
techmetx11
hari: i'm assuming the JSON object gets serialized to <message type="chat" from="hari.abc.org" to=[data.attrs.from]><body>Hello People</body></message>
-
MattJ
hari: you can enable debug logging (it looks like you are using xmpp.js? It has a debug mode you can enable), then you will see the exact XML sent/received
-
MattJ
If it looks correct, you should next investigate your server logs to see what happens next to the message
-
lovetox
about the <x> which was added for PMs. Is there any reason why the MUC Server can not add this tag ?
-
Zash
How does your server know it's a PM then?
-
Zash
Before it reaches the MUC
-
lovetox
ah because of MAM?
-
lovetox
yes its true that my server would not know it
-
lovetox
but this is no argument why the MUC server does not enforce that at least the other side knows it
-
Zash
Well it could if it kept track of MUC joins, which is possible but extra work.
-
lovetox
maybe i misunderstand how PMs work
-
lovetox
i thought PMs are sent "over" the MUC server
-
Zash
You → your server → MUC → recipients server → recipient
-
lovetox
its a chat message to a full jid
-
Zash
The MUC can't enforce things on the left side of tha
-
Zash
I don't see why it (and the XEP) couldn't enforce it on messages coming out tho.
-
lovetox
exactly and when i address a chat message with a full JID to a MUC server, what would it be other than a PM?
-
lovetox
ah
-
lovetox
i think i misunderstood your answer
-
lovetox
> Well it could if it kept track of MUC joins, which is possible but extra work.
-
lovetox
you meant my server
-
lovetox
obviously the MUC server keeps track
-
Zash
Sure
-
Zash
But I don't know if servers actively keep track of MUC joins
-
lovetox
i dont care about the left side
-
Zash
The minimum required is to keep track of directed presence.
-
lovetox
if a user uses a client who does not add the X, maybe this client does not need it, and has no use for it
-
lovetox
but that does not mean that others on the right side dont need it
-
Zash
MAM and Carbons could be confused, on both sides of the MUC
-
lovetox
sure, there are arguments for the sending client to add it, we dont need to discuss this
-
lovetox
but there are clients out there who will never get updated, because legacy
-
lovetox
Would it not be sensibel for the MUC server to add the <x> if it is missing, and the MUC server knows that its a PM
-
Zash
Yes, it would.
-
lovetox
thanks
-
Zash
Me, in 2014, apparently agreed as wel:: https://hg.prosody.im/0.10/rev/09151d26560a✎ -
Zash
Me, in 2014, apparently agreed as well: https://hg.prosody.im/0.10/rev/09151d26560a ✏
-
lovetox
so you are saying prosody does this already
-
Zash
yes
-
lovetox
great, one of the list✎ -
lovetox
great, one off the list ✏
-
Zash
But now I'm uncertain what happens if it's already there
-
Zash
Ah, been there, done that: https://issues.prosody.im/1427
-
lovetox
the whole occupant-id XEP is a bit optimistic isnt it
-
lovetox
> The occupant identifier MUST be generated such that it is stable. This means that if a user joins the same room a second time, the occupant identifier MUST be the same as was assigned the first time
-
lovetox
> One way to ensure these properties is to generate a private secret key
-
lovetox
so something that can be easily lost
-
Zash
Something like `HMAC(room.random, occupant.real_bare_jid)`
-
Zash
As easily lost as the room configuration 🤷️
-
Zash
In Prosody it's basically a hidden config option✎ -
Zash
In Prosody the room secret is basically a hidden config option ✏
-
lovetox
so you are saying, if a server operator would lose this key
-
lovetox
no ..
-
Zash
> One way
-
lovetox
the problem is the client will never know if this key was lost
-
Zash
You could just as well be lazy and make the room JID the key
-
lovetox
even if the room config is lost, and all rooms are wiped, if they are recreated, the client will never know
-
Zash
Why do you need to know that?
-
lovetox
because then all my assumptions which i base on occupant-id are out of the window
-
lovetox
obviously we have it to identify persons across nick changes and in anonymous rooms
-
lovetox
how this could be solved in my opinion is, if a value is placed in the room disco info which is also generated by this key
-
lovetox
as long as this value does not change i know the server operator did not lose his key
-
lovetox
hmm but what if the key is lost and a new one is generated
-
lovetox
all occupant ids would then need to be different
-
lovetox
so probably not *that* bad
-
lovetox
the only bad thing would be if a occupant-id now points at another user
-
lovetox
which is hopefully nearly impossible
-
lovetox
the only place i would notice is, if real jids are visible
-
lovetox
if i plan ahead and simply assume that a real jid per groupchat can in the end have multiple occupant-ids
-
lovetox
i should be fine
-
lovetox
or i simply never try to match real jids with occupant-ids, then im just oblivious to the fact that it changed
-
Zash
if you have real jids, do you really need occupant-ids ever?
-
lovetox
no, but if you have both one could imagine methods like, get_contact_from_occupant_id()
-
lovetox
and that contact would have a real jid
-
lovetox
or something in that realm, hard to say for what we will need the occupant id in the future
-
lovetox
for now lets count what we can do with it
-
lovetox
retract a message, track nick name changes
-
lovetox
hm maybe im overthinking this
-
lovetox
no we dont need it for message retraction
-
lovetox
for what do i need the occupant-id ..
-
lovetox
ah indeed message retraction
-
Zash
for retractions and such that happens in the MAM logs
-
lovetox
ah because its not moderation
-
Zash
if you do not observe the event directly (with all the presence info)
-
lovetox
its user retractions
-
Zash
ah yeah
-
Zash
for moderation you might at most want to have a way to select the user even if they try to avoid you by changing nickname
-
Zash
e.g if you select a message and have an action to ban the user from there
-
lovetox
in the moderation case i have the real jid anyway
-
Zash
ah, right, most likely
-
lovetox
also in the lmc case i could check the occupant id
-
lovetox
last time we talked about some other xep that was beeing rewritten
-
lovetox
becasue it misses occupant id
-
lovetox
do you remember what that was?
-
Zash
LMC in MAM, or live correction of a message you got from MAM, that was the original use case, right?
-
Zash
dunno, check logs of here?
-
lovetox
search for the win
-
lovetox
it was Mentions
-
lovetox
of course in a anonymous room you want to use something more stable then the nick
-
Zash
hm, yeah
-
Zash
occupant-id really should have been the resource slot instead of nickname :/
-
Zash
do moderators always have the real jid?
-
lovetox
admins at least
-
lovetox
not sure about moderators
-
Zash
If you could use occupant-id for administrative actions, then there's less need for them to see real JIDs
-
lovetox
moderators can see the real jid
-
lovetox
> but MUST include the new occupant's full JID only in the presence notifications it sends to occupants with a role of "moderator" and not to non-moderator occupants.
-
lovetox
the problem is the member list, you will always need the real jid for that
-
lovetox
so not worth it to hide it for other tasks ..
-
Zash
perhaps we should invent a new way to get the member list, with a single command instead of one per affiliation
-
Zash
IIRC there's been wishes for that before
-
Peter Waher
I think JID forwarding is a configurable property of a MUC room, no?
-
Peter Waher
cf. muc#roomconfig_whois
-
lovetox
yes it is, but fyi this does not apply to all occupants
-
lovetox
only to ones with specific affiliations✎ -
lovetox
only to ones with specific roles ✏
-
lovetox
e.g. admins/owners/moderators can always see your JID
-
Peter Waher
you can set muc#roomconfig_whois to anyone, to allow anyone™ to receive the same info (if that is of interest, for instance, for cybersecurity reasons)
-
lovetox
yes, we talk about the cases where people explicitly not do this
-
lovetox
maintaining certain features without having a stable identifier is tricky
-
lovetox
thats why occupant-id was invented
-
Peter Waher
(as there is no way to enforce adherence to nick-name-policies, and it is easy to pretend to be some-one else)
-
Zash
Peter Waher, let me tell you about https://xmpp.org/extensions/xep-0045.html#register
-
lovetox
acutally why was user retraction not made with MUC support
-
Zash
and https://xmpp.org/extensions/xep-0045.html#reservednick
-
lovetox
meaning, the MUC validates if a retraction comes from the right user
-
lovetox
and only forwards the retraction if it is
-
Zash
lovetox, because then all the MUC implementations must implement it?
-
Zash
and nobody can use it until then
-
Zash
nothing prevents that enforcement from being added, does it?
-
lovetox
so now all servers need implement occupant id, and nobody can use it till then
-
Zash
occupant-id is pretty easy tho, and useful for many things
-
lovetox
not true in a non-anon case we can already use it
-
pep.
"Zash> if you have real jids, do you really need occupant-ids ever?" Yeah, not to have 36 ways to do the same thing
-
Zash
2 == 36? ok
-
MattJ
Zash [21:55]: > perhaps we should invent a new way to get the member list, with a single command instead of one per affiliation https://xmpp.org/extensions/xep-0463.html
-
pep.
"Zash> If you could use occupant-id for administrative actions, then there's less need for them to see real JIDs" < this.
-
Zash
you're mixing hypothetical future possibilities with current states
-
Zash
> If
-
pep.
I was just reading logs and replying to that without reading the live feed
-
pep.
You're misinterpreting :)
-
pep.
s/this/I want this too/
-
Zash
Mixing threads is confusing without threading ;)
-
Zash
MattJ, there are too many XEPs!!!!1!!eleventy. I didn't know this one returned the initial state.
-
pep.
I know services where it's not possible to start a thread on a threaded message, so this certainly would have been useless :P
-
pep.
I wonder if affiliations results should contain the occupant-id too
-
lovetox
i would not open that box
-
pep.
Why not
-
lovetox
as said, the XEP says "MUST provide a stable-id"
-
lovetox
but we know because we are humans, that this will not be possible always
-
pep.
So we deal with it and it's fine?
-
lovetox
you could plan for it, but if you dont really have a use case
-
pep.
Wait what's "it" here?
-
lovetox
mapping jids to occupant ids
-
lovetox
whats nicer with occupant ids is, that there are included in messages
-
lovetox
not like real jids, where you need to map nicknames, to precenses
-
lovetox
and find the real jid that way
-
pep.
Yeah fwiw I think the resource was a mistake
-
lovetox
i guess everybody knows that, but nothing we can do about it now
-
pep.
We can progressively replace it :)
-
pep.
It's not like MUC stopped evolving
-
MSavoritias (fae,ve)
That would be nice. For stuff to evolve :D
-
Zash
Evolve or die (and be replaced by MIX)!
-
MSavoritias (fae,ve)
Heh. I can be behied that :P✎ -
MSavoritias (fae,ve)
Heh. I can get behind that :P ✏
-
pep.
meh
-
Zash
Or we could do Groupchat 3.0!
-
MSavoritias (fae,ve)
MUX? MAX? MUC reloaded?
-
lovetox
did someone implement MIX and found something bad designed?
-
lovetox
for me cost/benefit is still not there
-
lovetox
there is some pains with MUC, but there are not that bad that i implement a whole new protocol
-
singpolyma
Yeah, I think it's not "bad" so much as it's very complex and not backwards compatible with few advantages
-
lovetox
its probably better designed, but for the enduser very little changes probably
-
lovetox
does prosody have some MIX support?
-
Zash
Not that I know of.
-
singpolyma
Just minimix heh
-
MSavoritias (fae,ve)
We have been too busy fixing other stuff to think about MIX and MUC anyway
-
Zash
and so much OAuth 2.0
-
MSavoritias (fae,ve)
Yep. But from what i have read at some point either MUC will need some serious revisit or MIX will need to be fixed/implemented
-
Zash
The main architectural thing is that in MUC, it is clients that join the chat, while in MIX it is the user, thus it doesn't matter if the client goes offline or stuff. But we can sorta emulate that with affiliations and addons, plus we already have MUC implemented and deployed.
-
lovetox
does MIX allow the 20.000 user room use case?
-
singpolyma
lovetox: that use case the only issue is presence really, right?
-
Zash
With 20 people actually active?
-
lovetox
singpolyma, yes
-
Zash
Presence is optional in MIX (and MUC) so presumably yes.
-
singpolyma
I've seen some say they fix that by disabling presence in big mucs
-
Zash
But can a human being really keep track of that many people? IIRC Dunbar says we can remember about 3000 people.
-
lovetox
i dont need to know who is in the room
-
lovetox
question is if some things break down if i have no presence at all
-
lovetox
i guess not if all messages have a occupant-id ^^
-
Zash
20.000 participants you neither see nor hear from? That's probably fien.✎ -
Zash
20.000 participants you neither see nor hear from? That's probably fine :) ✏
-
Zash
At that point why not just poll MAM ?
-
Zash
Then you can skip the entering part
-
Zash
and all the parts
-
lovetox
for example currently a admin could not ban a user if presence is disabled
-
Zash
IIRC there was an idea for optimization where you only send presence if someone says sometihng
-
Zash
Then if someone says some shit, admins get presence and can use that to kickban
-
lovetox
also you can have no avatars
-
lovetox
but i guess MUCs could inject some kind of avatar hash into each message
-
singpolyma
Send presence before you send a message
-
Zash
Yeah
-
lovetox
i mean we could work around all those issues, and at the end we would probably land at something like MIX :D
-
Zash
And then we can add MIX the protocol on top of that MUC codebase!
-
Zash
And then phase out the MUC protocol bits
-
singpolyma
Current MUC avatars only barely work anyway and rely on stuff we'd like to deprecate (like vcard-temp)
-
Zash
After that any from-scratch implementation could be MIX from the start
-
Zash
singpolyma, so much this
-
singpolyma
Should do a new protocol that just uses pubsub ;)
-
Zash
load mod_pep onto the MUC, ???, PROFIT!
-
Zash
(srsly, if someone wrote some glue to hook up permissions with the MUC, then it should mostly work)
-
singpolyma
Zash: oh, I meant if we want to replace muc with something. PEP on the muc I want but that's not useful for avatars really
-
MSavoritias (fae,ve)
Yep. I am starting to mess around with a xmpp library myself and the choice was basically: MUC with a bunch of workarounds that make into MIX. Or MIX.
-
Zash
singpolyma, each MUC room gets a pubsub service, users could publish avatars there (% permissions)
-
singpolyma
Zash: gross
-
Zash
and then you could get away from the presence and vcard-temp requirements
-
Zash
singpolyma, why? it'd be kinda half-way to MIX
-
singpolyma
We can already do pep avatar with muc iq. We "just" need a way to advertise it
-
Zash
That requires an occupant and presence
-
singpolyma
I don't want to upload my avatar to every muc I join and have them all store it. Easy to get out of sync and very redundant
-
singpolyma
Zash: why presence?
-
singpolyma
I can do muc iq without presence
-
lovetox
i think this is already solved in prosody or not?
-
Zash
singpolyma, if you are offline, iq routing does not work
-
Zash
even the subset that gets redirected to the bare JID (which is an undocumented hack)
-
singpolyma
You mean not joined to muc? Sure, of course
-
Zash
could work if your nick was registered I guess
-
Zash
and needing a client to be joined is the big weakness of MUC
-
singpolyma
What is the undocumented hack btw? Based on namespace?
-
Zash
Yes
-
Zash
if namespace == vcard-temp then stanza.attr.to = barejid
-
Zash
IIRC ejabberd did it by handling vcard-temp to full JIDs :/
-
singpolyma
Makes sense. MUC iq is gross for sure. But it works well enough for this kind of thing. Unlike Muji where it's totally broken
-
lovetox
and if on the other hand is a server which does avatar conversion, then the request goes to your PEP or not?
-
lovetox
so in a way you can already request participants PEP in the MUC
-
singpolyma
> and needing a client to be joined is the big weakness of MUC Depends on use case I guess. It's also r big strength✎ ↺ -
singpolyma
> and needing a client to be joined is the big weakness of MUC Depends on use case I guess. It's also a big strength ✏ ↺
-
Zash
s/weakness/trade-off/ wrt MIX
-
singpolyma
Sure. You really want to see who is currently in the group though, especially with small groups. And big public rooms you don't want to hang around to everyone you've ever seen.
-
Zash
Either could be done either way, with various differences and something something
-
Zash
Don't you use affiliations anyway?
-
singpolyma
For which part? I use affiliations for some stuff yes
-
singpolyma
Here's a question: does it *ever* makes sense to route a MUC iq to full jid? What's the use case that would actually work for? BoB maybe, anything else?
-
singpolyma
(i know Muji is using it, but it pretty much doesn't work there...)
-
Zash
singpolyma, disco#info, version query, dunno
-
Zash
probably mostly things that are privacy nightmares
-
singpolyma
I guess it's semi fine for those. There are cases where it'll break but maybe not in ways that matter
-
lovetox
hey i have a nice addition for MUC Moderation XEP
-
lovetox
add request to delete all messages from a user with a certain occupant id
-
singpolyma
can do that in the client pretty easily, no?
-
lovetox
no
-
lovetox
also not a reason to do it there only because you *can*
-
lovetox
the server can do it better and with much less stanzas
-
lovetox
you can only moderate what you saw as a client
-
lovetox
(which granted will be enough most of the the time)
-
lovetox
but it may not be all
-
lovetox
further i think its not the nicest thing to send for example 100 retraction stanzas at once
-
lovetox
uhh thinking about LMC retraction is probably tricky
-
lovetox
if a message was corrected 3 times
-
lovetox
and i didnt store all 3 ids
-
lovetox
a retraction can have unwanted consequences
-
Zash
retraction of the middle LMC?
-
lovetox
no of the last for example
-
Zash
thanks for the fresh nightmare material! :)
-
lovetox
usually the user want to remove the message that he sees
-
lovetox
but i think clients dont store the old corrected message ids anymore
-
lovetox
hmm ... maybe i should not allow in Gajim to retract corrected messages
-
lovetox
or think about it a bit more
-
lovetox
in MUC i think you are save if the server replaces with a tombstone that only removes the body?
-
lovetox
or maybe this is simply something the receiving client has to take correctly care of