-
nicoco
so the muc xep has no "service restart use case". As I understand it, 332 means: "I'm shutting down, bye bye, see you some day in other life maybe lol". Isn't there a "I'm shutting down, but I'll probably restart soon, so maybe you should try re-joining automatically every few minutes?"✎ -
nicoco
so the muc xep has no "service restart use case". As I understand it, 332 means: "I'm shutting down, bye bye, see you some day in another life maybe lol". Isn't there a "I'm shutting down, but I'll probably restart soon, so maybe you should try re-joining automatically every few minutes?" ✏
-
nicoco
Zash, the lua snippet you pasted only included code 332, but shouldn't prosody send status code 110 too since this is a "self-presence"? maybe it's added somewhere else when presence-to==user-session or something?
-
MattJ
nicoco, I believe Prosody no longer sends 332 (partly for this reason)
-
MattJ
Local users have to reconnect (their whole XMPP session) anyway on restart, and remote users don't get disconnected (in the happy path)
-
nicoco
MattJ: I see. So clients really need to implement "muc self-ping schrödinger's cat" now to avoid being in the "I think I'm connected but I'm really not" state
-
MattJ
They do, and they always did
-
MattJ
Prosody's new behaviour means that it works properly more often than it used to
-
nicoco
I haven't dug enough to understand if this is sarcasm or not? all clients implement muc self-ping!?
-
MattJ
No, you said they "need to implement it now", and I'm saying they always needed it
-
nicoco
oh OK, right.
-
nicoco
and just so I'm sure I understand. prosody's mucs have some persistent storage for the "connected resources" so that it's persistent across restarts then?
-
MattJ
Yes
-
MattJ
So in the happy case, nobody notices a remote Prosody MUC service restarting
-
MattJ
If you send something during the restart, your server will give you an error bounce for that stanza if the MUC is unreachable, and your client will (should) reconnect
-
MattJ
If the server doesn't come back (e.g. it crashed) or s2s fails silently and you never send anything, that's where mod_ping_muc helps
-
MattJ
Both those cases are unrelated to Prosody's restart behaviour, since they can happen anyway
-
nicoco
I see. And there's no way for the MUC service to query a bare JID, sth like "hey! what resources of yours believe you are still joined? nothing happened, just asking for a friend"
-
MattJ
No, the MUC service doesn't have a subscription to the user, and isn't permitted to know about any resources that haven't explicitly joined the MUC
-
nicoco
OK, thanks for your replies! I don't think that for a MUC gateway, it is a good idea to behave like prosody. When prosody is down, no messages can go through, so it's OK to respawn "unnoticed by clients". If a gateway MUC component wanted to behave like prosody, it would have to keep (persistent) track of both joined resources and chat history, then on restart fetch the "missed" messages and send them to the resources with a delay tag. This is because, when the gateway is down, the legacy service can still have messages being exchanged. So I'd rather send send "kick" (status code 332) and let clients reconnect; then it's up to the clients to correctly retrieve chat history for this MUC. Since most other IM services have a "fetch group history" endpoint, this seems a lot less trouble to implement... I am thinking out loud here, anyone feel free to chime in and tell me if I overlooked something.
-
nicoco
But ideally, a status code 33x meaning "I'll be down, but I'll be up again in not too long" would be better than this 332…✎ -
nicoco
But ideally, a status code 33x meaning "I'm shutting down, but I'll be up again in not too long" would be better than this 332… ✏
-
pep.
Isn't it possible for s2s (only?) to send reset? at the stream level
-
Zash
pep., reset, the stream error? for what purpose?
-
pep.
Telling clients to reconnect?
-
Zash
Not aware of anything like that.
-
Zash
But that's kinda the goal of mod_ping_muc, it activates when a s2s link is closed and sends a xep-0410 ping on behalf of local clients to find out whether they are still in remote MUCs
-
pep.
Zash: The MUC sends the ping? Local clients? Remote MUCs?
-
Zash
pep., your local server sends ping (implicitly attempting new s2s)
-
Zash
it's basically the same as XEP-0410 but happening on the server instead of clients
-
pep.
Ah this way around, ok
-
Zash
and happening at the time of s2s disconnection (regardless of reason) since the server sees this but clients don't
-
pep.
So the module is loaded on the account vhost not a MUC
-
pep.
Ok
-
Zash
In the case where the MUC host shut down, it can't very well be sending anything while it's down.
-
Zash
Also race conditions between flushing buffers and `exit()` can result in unclean shutdowns, so anything sent from the MUC might not make it.
-
Zash
Or the MUC might have crashed, can't very well tell anyone about that.
-
lovetox
Sam, you asked earlier how to create a room with Gajim
-
lovetox
Gajim -> Create Groupchat
-
lovetox
Its in the Menu
-
lovetox
Its rather sad that nobody could give you this info in a room with 300 people that use Gajim
-
Zash
Bystander effect? "Someone else will answer"
-
lovetox
yeah someone answered, sadly a person with no clue
-
Zash
Take it as a UX or documentation bug report? :)
-
Sam
lovetox: the room is on a server that's not the same as the domain, as far as I can see that just requests a name, not the domain to create it on
-
lovetox
in the dialog are 2 options
-
Sam
(I did try that, I foolishly typed in room@whatever and it created a room with that name on the server of my JID :) )
-
lovetox
private and public
-
lovetox
its true that you cannot choose a remote address for private chats
-
Sam
What does that have to do with the domain?
-
lovetox
but if you click public it shows you a jid field
-
lovetox
where you can put it anything you like
-
Sam
Oh, weird, I see now; I don't get what that has to do with it being public or private though, but I wanted a private room at my other group chat server anyways
-
lovetox
yes just create a public room there
-
lovetox
go into the config, and make it private
-
Sam
I don't want a public room though ¯\_(ツ)_/¯
-
lovetox
Oo wow
-
Sam
Is this some technical restriction I don't know about? I don't see what the address option has to do with the public/private option
-
Sam
But yah, I definitely never would have found this hidden behind the public option
-
lovetox
For a guy writing xmpp software i suprised how hard this is :D
-
Sam
I dunno, I guess consider this a UX report like Zash said, I have no idea how this would be obvious to anyone
-
Zash
How common is it to create private chats at remote MUC hosts?
-
lovetox
Thats the UX, it should not be obvious
-
Zash
How common is it to have >1 available?
-
Sam
Is gajim only for people who also develop XMPP software?
-
lovetox
you are the first person ever who asked that question in 5 years
-
lovetox
and we still provide a option for you
-
Sam
I still don't understand what these options have to do with one another or why I'd look for that box under public
-
Sam
I mean, I assume other people have group chat domains that are for a specific project or organization or something, no? I'm not saying this is super common or that it should be a thing that's specially supported, just that I never would have found that dialog where it was and I don't understand the logic of these two options being tied together.
-
lovetox
nobody says they are
-
Sam
I didn't understand that; nobody says what are what?
-
lovetox
that public has anything to do with creating jids on a remote server
-
Sam
Then why are they tied together in the UI? That's what I'm trying to understand
-
lovetox
because we dont want to show users a JID field, because they dont know what to do with that
-
Sam
Why would they know what to do with that if they pick "public"?
-
Martin
Sam: I think the UI comes from https://docs.modernxmpp.org/client/groupchat/
-
lovetox
users who create public rooms are most of the time advanced users
-
lovetox
they know what to do with that
-
Sam
Okay, thanks, that was the reasoning I was trying to get to. I *really* don't think that's true though.
-
Sam
Anyways, fair enough, you say the UX makes sense, I say it doesn't make any sense and I never would have found that if you hadn't told me. I dunno, ignore it if you want or ask others or do whatever you do to figure out UI I guess and consider this a report. Thanks for letting me know.
-
lovetox
i never said its obvious, and thats not by accident, most server block foreign users creating rooms, this is really a edge case
-
lovetox
but if i think about that dialog, instead of public and private, we could simply do a advanced box
-
lovetox
and offer a public switch there or something
-
Sam
Advanced makes a lot more sense to me. I'm not sure why "public" would be advanced, but if you're going to have an address at another server I could see that being advanced.
-
Sam
If it were me I'd just have name, server (pre-filled to their domains MUC server), public/private. No need to hide stuff if there are only like 4 things.
-
Sam
(oh, and description or whatever else was already on the form)
-
lovetox
hm i dont agree, as i said you overestimate how much people care about the JID
-
lovetox
they want to create a groupchat, and give it a name
-
Sam
I don't think people care about the JID, I just don't think the fact that no one cares means it needs to be hidden.
-
Sam
At least not in the way it is now which makes no sense. If it were behind an advanced flag that would make sense, I just don't think it's necessary for a single field.
-
lovetox
hm so how would a user not accustomed with the protocol details, know that he does not fill out that field?
-
Sam
Because it's pre-filled to their server already.
-
lovetox
thats not enough
-
wurstsalat
Keep it simple, hide distractions. People fiddle with every knob once those are visible
-
lovetox
you need a local part also or
-
Sam
They don't need to know protocol details anyways, they know they have an address like user@whatever.com already, that much they have to know to use XMPP at all.
-
Sam
Sure, it says "name" at the top or whatever.
-
Sam
Same as it does now, that part doesn't have to change.
-
lovetox
but they ask themself, what it is, do they have to change it etc
-
lovetox
and the answer is always NO
-
lovetox
you dont need to care about this at all
-
Sam
I think you're underestimating your users, they literally already have to know that it's at a server already.
-
lovetox
only in the edge case that you need to create a room on another server
-
lovetox
which probably going to fail, because almost no server allows that
-
moparisthebest
We once had a user click a "copy from production" button *in production* which broke stuff because they "wanted to see what it would do"
-
lovetox
because of spam
-
wurstsalat
moparisthebest: yes.
-
lovetox
lets leave it at that, i agree there should be advanced option
-
lovetox
i dont agree showing a user a groupchat adress
-
Zash
<button>⚠️ DO NOT CLICK</button>
-
Sam
Yah, I having an advanced button seems like it at least makes sense
-
Zash
Create: [ private chat | public channel | custom (expert mode) ]
-
Zash
I promise you 100% of users will pick expert mode because they're experts!
-
lovetox
Create: [ private chat | public channel | Click here Sam ]
-
Sam
RE users filling out anything even if you tell them not to: we have a field in the registration form for social.coop that says something like "Leave this field empty, it is a spam trap" or something and people constantly fill it in with random stuff and ask why their application ended up in spam. TBF, that field should really be hidden by CSS, but still.
-
moparisthebest
Zash: haha yea it was a bug that the button showed up on production, but clicking it literally had a pop-up that said roughly "this will wipe all data and copy from production are you sure?" And they still clicked yes