-
hari
this.xmpp.on("stanza", async (data) => { console.log("Hey we're online! \t", data.attrs); const message = xml( "message", { type: "chat", from: "hari.abc.org", to: data.attrs.from }, xml("body", {}, "Hello People") ); console.log(message.attrs, "attr"); await this.xmpp.send(message); });
-
hari
MattJ why its continuously sending stanza in the server
-
hari
<message type="chat" from="hari.abc.org" to="hari.abc.org"><body>Hello People</body></message> Like this continuously
-
Zash
`to` equals `from` ?
-
Zash
Is it sending itself a message and then replying to it, in a loop?
-
MattJ
hari: maybe log what data it is replying to, it seems to be replying to itself
-
nicoco
Are there MUC components that force you to use the same nickname if you join a room with different clients and is there a related XEP for this? I have a vague idea that this was a thing but my ddging skills are failing me
-
MattJ
I'm not aware of any XEP. As for implementations, it seems like something an IRC gateway might do, but I'm not sure if biboumi does.
-
MattJ
When I say there's no XEP, I mean there's no XEP beyond XEP-0045 - which allows the service to force a nick, and also allows nick discovery.
-
Kev
XEP-0045 gives you the protocol for forcing nicks on people
-
MattJ
Just don't ask me which clients support these things :)
-
nicoco
thanks! some gateways (including slidge) definitely do that but I wondered if this behaviour existed outside of a gateway context. it's been working fine on most clients I use (dino, gajim, cheogram) and apparently soon™ in beagle too, cf https://github.com/tigase/beagle-im/issues/138
-
Zash
Prosody supports forcing use of registered nicknames
-
Zash
Might be a service-wide opt-in setting tho?
-
hari
MattJ `from` here is our component only , it loops and send stanza to itself
-
MattJ
`if(data.attr.from == "hari.abc.org") { don't send stanza }` :)
-
MattJ
But I'm still curious what stanza it is
-
hari
if (data.attrs.from != "hari.abc.org") { try { await this.xmpp.send(message); } catch (err) { console.log(err, "error"); } } I tried this .
-
MattJ
Looks good
-
hari
And then ,how to create muc using xmpp.js in client ?
-
MattJ
You send this to the address of the MUC you want to create: https://xmpp.org/extensions/xep-0045.html#example-153
-
MattJ
If this is a client (not a component) don't set 'from' here, just 'to'
-
Zash
I would recommend that you look trough the library docs for e.g. a MUC join function
-
MattJ
xmpp.js doesn't have a high-level MUC API, unfortunately
-
nicoco
> Prosody supports forcing use of registered nicknames Zash: thanks! interesting to know.
-
lovetox
consider the following scenario, one device joins a MUC, writes 3 messages, changes his nickname
-
lovetox
second device joins this MUC, requests MAM receives the 3 messages
-
lovetox
am i right to assume there is no way for the second client to ever detect that these 3 messages were sent by "us"
-
singpolyma
Indeed
-
singpolyma
Here's a worse one. Someone join with nick X and send 3 messages. They leave. Totally different person joins now with nick X. They get MUC history. No way to tell they didn't send the messages themselves...
-
singpolyma
Could say you are allowed to see your own jid, but this is not done today I think
-
lovetox
occupant-id also solves this i guess
-
singpolyma
Or non anon. Saying you can see your own jid actually makes sense I think, I dunno
-
lovetox
it would, question is does the server even store it
-
lovetox
is there a reason for the server to store the real jid beside each message, in a anon room
-
singpolyma
Moderation
-
singpolyma
To be able to see who it was and ban
-
lovetox
? i think you misunderstand me, your suggestion was to attach the real jid to MAM results, if the message is from "you"
-
lovetox
i said this can only be happen if the server even stores that information
-
singpolyma
Right. I'm giving another use case for the server to store this
-
lovetox
i dont see any moderation task that needs a real jid saved to MAM
-
lovetox
banning kicking, has nothing to do with messages
-
singpolyma
Join room I moderate, see spam, how do I know who to ban if they left?
-
singpolyma
Need their jid somehow
-
lovetox
i forgot, the server needs to store it anyway
-
lovetox
because it needs to attach it at least to mam queries of Admins who always can see the jid
-
lovetox
so this information needs always be present i guess
-
singpolyma
Yes
-
lovetox
but yeah, occupant-id solves this also, no need to invent something additional
-
lovetox
i guess i have to live with sometimes simply not beeing able to determine that a message was sent by another device of mine
-
pep.
> Could say you are allowed to see your own jid, but this is not done today I think This is done in some impls I think
-
pep.
At least I'm doing it in my own implementation based on recommendations of other servers, (or rather, "prosody")
-
MattJ
That only helps if they are still online though, right?
-
MattJ
It seems to me that only occupant-id, plus storing that in MAM, is a solution here
-
MattJ
Obviously not for the retrospective ban or whatever
-
MattJ
But maybe we can define a way to perform admin actions on occupant ids
-
singpolyma
> That only helps if they are still online though, right? No, the idea is to put true jid in history/mam result ↺
- Zash looks at MAM results
- Zash sees `<occupant-id xmlns="urn:xmpp:occupant-id:0" id="DQtF4ZYfA81+iAg5zQ46PyK2p/1O4V577dcmlHrAsLE="/>`
-
singpolyma
Yeah. IIRC true jid is also there when allowed. I didn't think we're proposing a new idea
-
pep.
MattJ, I've planned to investigate about https://logs.xmpp.org/xsf/2023-01-05?p=h#2023-01-05-fe0286ff34b3de39 "A MUC could pretend to be non-anon and give out burner JIDs at a companion service" to have something that can be used in admins actions (because it's a JID)✎ -
pep.
MattJ, I'm planning to investigate about https://logs.xmpp.org/xsf/2023-01-05?p=h#2023-01-05-fe0286ff34b3de39 "A MUC could pretend to be non-anon and give out burner JIDs at a companion service" to have something that can be used in admins actions (because it's a JID) ✏
- Zash tracks down https://hg.prosody.im/prosody-modules/rev/391c508e0b75
-
pep.
Also that could be the end of public rooms, by using MUC-issued aliases and making everything public :P✎ -
pep.
Also that could be the end of non-anon rooms, by using MUC-issued aliases and making everything public :P ✏
-
singpolyma
You mean of semi Anon rooms?✎ -
pep.
singpolyma, they would be de-facto anon
- singpolyma
-
singpolyma
Right
-
singpolyma
I've considered running some in a new class "members can see JIDs"
-
lovetox
Not sure what problem you are talking about. Admins always see jids, and hence can do moderator actions
-
singpolyma
So you don't have the spam harvesting problems as much but it's mostly non anon
-
Zash
Hm, so we store real JIDs in MAM in whois=anyone rooms. Should that be done in all, but filtered so only mods can see?
-
pep.
mods or self?
-
Zash
Rules should be the same as if you were there and saw it live.
-
singpolyma
Yes
-
Zash
Gets weird with configuration changes tho
-
singpolyma
You mean because a re-fetch might see more/less data? That seems fine
-
Zash
No, I mean that if the room was whois≠anyone at the time you wrote a message, and later it changes to whois=anyone, it's weird to retroactively publish your JID
-
Zash
Anyway, "if you could have seen it live, you should see it in MAM" seems a sensible general rule✎ -
Zash
Anyway, "if you could have seen it live, you ~should~ may see it in MAM" seems a sensible general rule ✏
-
lovetox
Still don't know what you all are talking about, this all already works like forever
-
lovetox
Otherwise omemo would not work
-
pep.
Because one generally uses OMEMO in non-anon rooms
-
singpolyma
I'm just talking about added "self" to the list of can see
-
singpolyma
pep.: also truu
-
lovetox
There is no anon room in xmpp
-
lovetox
There is a semi anon room
-
lovetox
Which means you ommot info for some users✎ -
singpolyma
Yes, but you don't use omemo with semi anon
-
pep.
And non-anon. Even though I agree the term is weird
-
lovetox
Which means you omit info for some users ✏
-
pep.
But "public" is already taken
-
Zash
Since there is no true anon room, we could assume semi-anon and anon are synonymous
-
lovetox
The point is admin can see jids always
-
lovetox
So this info is already present in mam storage
-
singpolyma
Is or should be yes
-
lovetox
> Hm, so we store real JIDs in MAM in whois=anyone rooms. Should that be done in all, but filtered so only mods can see? This sentence makes it seem the info is not stored
-
Zash
In Prosody, it is not.
-
jonas’
Guus, in case you didn't see, the aioxmpp bug turned out to, indeed, be a bug in python 3.11.3, so you can now un-pin your python version (3.11.4 was released earlier this week)
-
Guus
jonas’: thanks, I was already planning to give it a go.
-
Guus
jonas’: no joy. Probably waiting for a GitHub action to be updated.
-
moparisthebest
jonas’: what was the bug? I'm curious