-
jcbrand
Has anyone here though about or come up with a way to identify messages from bots? Seems like one can just include a special tag and namespace for it. Is there anything like that in the wild already?
-
jonas’
jcbrand, bots should publish a bot identity in disco#info and clients should use that
-
jonas’
jcbrand, https://xmpp.org/registrar/disco-categories.html#client
-
jcbrand
so you should send a disco query for every single message in a MUC?
-
jcbrand
not really practical in certain use-cases
-
jonas’
'115 caches
-
jonas’
or if that’s not feasible because MUC, you can just query when the participant enters the MUC
-
jonas’
and cache the information until they leave it
-
jcbrand
You can really see that XMPP was designed without ever thinking about web clients
-
jonas’
attaching such metadata to each and every message is incredible overhead
-
Zash
Hats
-
jcbrand
oh, I like that thanks Zash
-
jcbrand
We already have hats
-
Zash
<hat>🤖️</hat>
-
jcbrand
problem solved
-
Zash
😀
-
jonas’
... *sigh*
-
jcbrand
lol
-
jonas’
web making everything terrible again.
-
jcbrand
enjoy your ivory tower
-
jonas’
jcbrand, to be clear, I’m not blaming *you*
-
jonas’
I’m blaming the web.
-
flow
jcbrand, out of curiosity: why doesn't the approach suggested by jonas’ work for web clients?
-
Zash
jcbrand, isn't this MUC being web-unfriendly rather than XMPP itself?
-
jcbrand
jonas’ yeah sorry, I don't want to be hostile, but the anti-web attitude in the XMPP community does grate a little sometimes. No big deal tho
-
jonas’
jcbrand, fair. Let me state for the record that I am really glad for your work on converse.js, because despite the web being terrible, XMPP-IM needs a web client which is *not* terrible and you seem to be doing a fairly great job at that.
-
Ge0rG
what jonas’ said, 👍 for jcbrand
-
jcbrand
aw shucks, thanks guys
-
Zash
It's really the anti-everything-except-the-web attitude of the web that irks me.
-
jcbrand
Sure, I get that
-
jonas’
web-pacman✎ -
jonas’
web-pacman.gif ✏
-
jcbrand
flow: my knee-jerk response is that in various situations you can't cache/store everything across sessions like you can with desktop clients
-
Zash
jonas’, now I need you to drop everything and make that gif. you may edit the systemd-om-nom-nom.gif 😉
-
jonas’
jcbrand, but hypothetically, if you did the disco#info on the first message from a participant and cached that for a session (or until that participant leaves), that would be feasible and good enough, wouldn’t it?
-
jcbrand
jonas’: yes, but that is then not XEP-0115 compatible right?
-
jonas’
I’m not sure '115 even works in MUCs
-
Zash
In theory you could cache caps-hash → disco response forever
-
jonas’
if it did, you could sometimes skip disco#info lookups if your session has already seen the hash though if '115 worked
-
jcbrand
Yes, but in web clients you can't✎ -
jcbrand
Zash: Yes, but in web clients you can't ✏
-
jonas’
even that can do a lot (e.g. if the bot only hops into the room briefly and you don’t know the real JID)
-
jcbrand
You say that including a tag is wasteful, but in a MUC with an occasional bot post and lots of posts by other users, it seems wasteful to me to do a disco-info for each new poster
-
jcbrand
it could be a tag on the presence, not the messages themselves
-
jcbrand
But it's ok, the hats thing will work for my current use-case and for the open Jabber network doing a disco query for each new occupant is probably also fine
-
jcbrand
not each new occupant but each new message author
-
flow
jcbrand, you probably can re-use the disco#info information for other purposes too, so I am not sure if it is that wasteful
-
jcbrand
Unless you want to identify bots in your occupants list...
-
jcbrand
seems very chatty to me. On a desktop client you can cache all this fairly aggressively, but on web you need to do potentially hundreds or thousands of disco info queries for every session
-
jcbrand
On web there is IndexedDB which doesn't have a size limit, so in theory you can use that and then your webapp is more like a desktop app, but having integrated that into Converse (via localForage), I've seen that writes are suuuuper slow.
-
jcbrand
And you can't use IndexedDB in all cases
-
jcbrand
I have some ideas on how to improve performance on Converse (basically batching writes), but haven't had the time to iron out the kinks
-
Ge0rG
jcbrand: what about localStorage?
-
jcbrand
localStorage has a 5MB limit, so if you have lots of MUCs it fills up pretty quickly
-
jcbrand
Now you could regularly delete older messages, but then you lose your OMEMO history
-
jcbrand
So far that has made me reluctant to aggressively get rid of older messages
-
Zash
I can't actually use Converse.js anymore, it runs into those limits in a few minutes 😕
-
jcbrand
If it wasn't for OMEMO then it would be much easier
-
Zash
Not while joining all MUCs anyway
-
jcbrand
Zash: If you're up for it, you can try the master branch with IndexedDB
-
jcbrand
performance has improved a lot recently
-
jcbrand
Still quite a bit slower than localStorage, but usable IMO (although not usable in some use-cases like having it integrated into an existing resource-hungry site)
-
jcbrand
I might even make IndexedDB the default in the 8.0.0 release (especially if I can get the batched writes to work well)
-
jcbrand
One advantage that disco has over hats is that hats are per MUC, so you have to assign them for every new MUC the bot enters
-
Zash
Hm, reminds me of the issue of MUC-component wide affiliations and such.
-
jcbrand
yeah, would be great to have
-
jcbrand
is any of this fixed or improved by MIX?
-
jcbrand
Not that I expect MIX to supplant MUC any time soon
-
eric
> eric: for which > screen size is certainly still a problem for KDE apps, like with plasma mobile the wifi setup dialog, no one had tested it with WPA2 Enterprise, the OK/Cancel buttons were off-screen, I had to hook it up to a monitor to set it up moparisthebest:
-
moparisthebest
I thought web apps could request more localStorage space nowadays?
-
moparisthebest
eric: ah, no, but in general there are many more bugs than things that actually work in Linux phone land so I'm just waiting it out :)
-
Sam
Reminder that XMPP Office Hours for this week are today, not Friday! "Soprani.ca: bridging us all together" by Stephen Paul Weber (singpolyma) on Wednesday, 31st March 17:00 UTC
-
Sam
Office Hours for this week (about jmp.chat) is starting now! https://socialcoop.meet.coop/sam-pku-dud-niv
-
flow
Ge0rG, why are groupchat messages in an user archive a bad idea?
-
Ge0rG
flow: because the client needs to support that, be aware that those come from a MUC, and treat them differently. I think that the MUC MAM approach has worked better.
-
Ge0rG
Most clients today will probably do weird things when receiving groupchat messages from MAM
-
flow
Ge0rG, thanks for the reply. But I've to admit that this appears to be more like a client issue
-
Zash
There's also the problem with how a MUC will send one message for each joined resource, which complicates server processing.
-
Zash
Way simpler for the MUC to do it, as it already knows when processing that it's a single message, before it broadcasts it.
-
Ge0rG
flow: a MUC will only send messages to you while at least one client is connected. If you only have one client, you will only receive from MAM what you already had before. If you have two clients, you will receive a random subset of the room history with no way to know where there are holes
-
Zash
There are scenarios where it's desirable that the user only sees history from when they're joined, but it does get weird and should probably be dealt with on the basis of affiliation.
-
Ge0rG
It's getting even more weird with MIX MAM, and I've been telling that for years.
-
Kev
BTW, saying “no-one does this” isn’t correct :)
-
Zash
This is the point where I mention that experiment I did in rewriting outgoing MUC joins so that they come from the bare JID?
-
Kev
But you’re right that it doesn’t work terribly well.
-
Ge0rG
Kev: I'm eager to read your implementation and interop story on the ML
-
Zash
Ge0rG, what about MIX MAM ?
-
Ge0rG
Zash: you could convert that from a 20% implementation to an 80% implementation, and I'd actually test it
-
Ge0rG
Zash: s2s isn't flawless, it will cause holes in MAM
-
Zash
What's those 60% then?
-
Ge0rG
Zash: tracking outgoing presence, leaving rooms, nickname management, bookmark sync
-
Kev
If we have a MAM meta-search that searches each archive, we could probably get away without having mix history in personal archives.
-
Zash
Ge0rG, but how will I be motivated to work on it without at least someone testing it?
-
Ge0rG
Zash: well, how am I supposed to test it if it breaks everything?
-
Zash
Someone needs to go push the stalemate resolution button!
-
Zash
And there's like 3 different bookmarks methods atm, that seems fun to deal with
-
Zash
Ge0rG, track what outgoing presence?
-
Ge0rG
Zash: room joins from clients?
-
Zash
That part should work afaik
-
Ge0rG
What about error handling?
-
Zash
That goes under "leave"
-
Zash
which is under TODO
-
Zash
I think it even dedups additional joins, tho I'm not sure that's optimal.
-
Ge0rG
Zash: it's a server module in a state I can't possibly deploy on a production server, and I'm only using one single room from my other server
-
Zash
Should set up that bleeding edge Prosody instance for client devs ... one day.
-
Ge0rG
Yeah, crash me!
-
Kev
What rules would be needed? Just rewrite anything going to/from a MUC so that the user part is bare?
-
Kev
Determining it’s a MUC by the first thing that’s sent being a presence with muc in it?
-
Ge0rG
Kev: you need to implement a bouncer that will multiplex the room between all your clients
-
Kev
Oh yeah, that.
-
Kev
So, basically imprementing MIX-PAM, in other words.
-
Zash
Pretty much
-
Ge0rG
Kev: kinda sorta
-
Ge0rG
Well, it's probably not so much to implement, and doesn't need to persist anything. But it might have to do sophisticated things with room history generation on join
-
Zash
Keep track of joined rooms, joined resources to deal with rewriting in- and outgoing stanzas. Then subject and participants which lets you add new local resources and send them a synthesized join presence flood.
-
Kev
So, it’s much worse that just implementing MIX-PAM.
-
Zash
No, it's better because it works with MUC, which is what Everyone™ is using today.
-
Zash
With zero changes required of clients
-
Kev
I mean it’s much worse to implement.
-
Ge0rG
And with a manageable overhead on the server
-
Zash
Sure, it's MUC
-
Kev
You know what it is like implementing, actually?
-
Kev
It’s basically implementing FMUC.
-
Kev
Which is a MUC implementation that can join another MUC.
-
Zash
FMUC-on-your-JID
-
Zash
Because we need more things-on-your-JID! 😀
-
Kev
It’s the bastard child of MIX-PAM and FMUC.
-
Ge0rG
And implementing it will give a significant immediate benefits
-
Ge0rG
Mobile clients don't need to self ping any more
-
Zash
Now the server will need to self-ping! 😀
-
Ge0rG
You'd get reasonable push integration
-
Ge0rG
Less presence flooding of rooms
-
Ge0rG
Zash: the server knows about its s2s, so it only need to self ping after s2s went down
-
Zash
Could probably do the presence versioning thing, closer to the user.
-
Ge0rG
Zash: needs new protocol
-
Zash
Hm?
-
Ge0rG
Kev: that solution is 100% transparent to existing implementations both on the client and on the MUC
-
Zash
In theory you could do the same thing but have it speak MIX
-
Kev
In theory you can do anything with enough monkeys and typewriters, yes :)
-
Zash
No idea if MUC-MIX translation is easier on the users' server or the MIX host.
-
Kev
MIX. Much :)
-
Zash
Ge0rG, FWIW I think it's okay to leave the door open for storing groupchat messages in the users local archive, but Something Needs To Be Done first.
-
Ge0rG
Zash: yes, a new XEP needs to be written.
-
Ge0rG
No place in 313 for this
-
Kev
Is it worth having to bump the namespace for the sake of changing the SHOULD to the MUST?
-
Zash
Ugh
-
Ge0rG
I remember having to explain to another developer not to do it like written in the XEP
-
Ge0rG
Kev: which one?
-
Kev
MAM.
-
Zash
Let's not bump any namespaces
-
Kev
I think changing a SHOULD to a MUST would require that.
-
Zash
SHOULD NOT then?
-
Zash
or perhaps a PLZ DONT
-
Ge0rG
Kev: there are 14 SHOULD and a dozen should.
-
Ge0rG
So which one are you talking about?
-
Zash
The one closest to the word 'groupchat' I would have presumed?
-
Ge0rG
So... > A server ~SHOULD~ MUST also include messages of type 'groupchat' that have a <body> I really hope that's not the intention
-
Kev
You proposed onlist changing into MUST NOT store gcs.
-
Kev
I think.
-
Ge0rG
Kev: last time I checked, MUST NOT was the opposite of MUST, so please excuse my confusion. But yes, I suggested that.
-
Ge0rG
As an escalation of "SHOULD NOT", but I like strong words.
-
Ge0rG
I also looked up that the first time I wrote "MAM subscription" on list was in 2015, and probably even earlier in here.
-
Zash
This is a wordification of what future (currently unreleased) Prosody will do, if nothing changes before the next major release: - **Do not** store messages of type headline since these are supposed to be for transient notifications, most often PEP events. - **Do store** messages of type error, since if you sent a message it is of interest to know that delivery failed. - **Do not** store messages of type groupchat, as MUCs will send one message per joined resource and most often provides their own MAM. - Follow \[XEP-0334: Message Processing Hints\] advising for or against storage. - **Do store** messages with a `<body>` and/or `<subject>` element, as these carry messages for users. - **Do store** encrypted messages for the same reason as with `<body>`, as indicated by \[XEP-0380: Explicit Message Encryption\]. - **Do store** messages with \[XEP-0184: Message Delivery Receipts\] requests, and the receipts themselves, as if something is important enough to need such a receipt it is probably important enough to archive. - **Do store** messages with \[XEP-0333: Chat Markers\], for the same reasons as with receipts. - **Do store** MUC invites, both mediated and direct. - **Do store** messages with an \[XEP-0353: Jingle Message Initiation\] payload, as users will want to know if they had missed calls. - Anything not covered by this point is either something new that may or may not warrant adding to the archive or something that should not be archived.
-
Kev
And I don’t think you’re even the first person to suggest mamsub ;)
-
flow
Ge0rG, I like you response on the ML, but you may want to consider adding reasons against groupchat messages in a user archive. I think your mail contains none, and the reasons are good. I feel we often discuss on the mailing list stating "everyone knows that X is a bad idea", without actually providing any reasons/arguments why it is so. And that probably deters people from participating.
-
Ge0rG
flow: thanks! I'm not going to be at a proper computer for the next days, so feel free to summarize, link or copy paste what we discussed here today
-
Kev
If you were to do dedupe on the server, or whatever, you could also achieve reasonable groupchats in the archive behaviour.
-
Kev
And probably for less work than trying to implement the MUC-PAM discussed earlier.
-
Zash
That's a big and messy if tho
-
Kev
Unlike finding a way to do dudupe and everything else involved in MUC-PAM? :)
-
Kev
I’m just giving another reason that I think MUST NOT would be excessive.
-
Zash
Just Unfork Stuff™
-
Zash
Kev, I agree tho, if you do go and solve that and other issues, storing groupchats in the users archive is probably okay.
-
Ge0rG
Kev: also please solve reliable s2s while you are at it. And World Peace. Whatever is easier.
-
Zash
You know what, let's flip that default
-
Ge0rG
Kev: you need additional protocol to get MUC messages into the user account, even when no client is connected, which is surprisingly close to MUC-PAM
-
Ge0rG
Without that, you get invisible holes in MUC history, which is the opposite of what xmpp needs
-
flow
not sure if we MUST keywordify here, it appears a simple "we found that user archives with type=groupchat messages cause trouble if not taken special care of, and clients may want to consider ignoring type=groupchat messages in a user archive"
-
flow
could be sufficient
-
Kev
Makes sense to me.
-
Ge0rG
I still think that servers shouldn't send all the MUC garbage to a client
-
moparisthebest
Looks like XMPP infringes on this patent in the USA, </stream:stream> illegal: > The claimed invention is a system where at least one robot “generates a goodbye command that terminates a communication session” with another robot and “relinquishes control.” https://www.eff.org/deeplinks/2021/03/stupid-patent-month-telehealth-robots-say-goodbye
-
Ge0rG
Is it April Fool's already?
-
moparisthebest
Unfortunately no