XSF Discussion - 2023-07-27


  1. Guus

    Has anyone worked on an approach that would allow you to terminate XMPP TLS on a load balancer, rather than on an XMPP server itself? With duplication of some certificate material, that's probably easily doable for BOSH and websockets - but StartTLS?

  2. Zash

    Only in my head.

  3. MattJ

    IIRC the old stuff for nginx could do that

  4. Kev

    It's easy enough if you can cooperate.

  5. MattJ

    https://github.com/robn/nginx-xmpp

  6. Zash

    Hard if you want channel binding other than the certificate one

  7. Zash

    or client cert auth

  8. Kev

    Like I say - those things are easy if you can cooperate (and trust). But yes, they're hard if you can't.

  9. jonas’

    Guus, the xmpproxy thing by moparisthebest?

  10. jonas’

    https://github.com/moparisthebest/xmpp-proxy/

  11. MattJ

    Of course, I forgot (?) that can do starttls

  12. Zash

    Vaguely relevant new thing: https://www.rfc-editor.org/info/rfc9440

  13. Guus

    Oh, that's a lot more information than I anticipated receiving - thanks :)

  14. Guus

    Not using StartTLS but direct-tls / 5223 instead, that'd make things easier too, right?

  15. Zash

    Yes but no

  16. Zash

    No channel binding or cert auth, thus no s2s with Modern® servers :)

  17. Guus

    aye - I'm caveating my documentation that this largely applies to client-connections only (where SASL EXTERNAL is rarely used)

  18. Zash

    Channel binding is nice tho

  19. jonas’

    the readme of xmpp-proxy suggests that it works for s2s, too

  20. jonas’

    I wonder how that works (if it forces dialback or what)

  21. Zash

    Unless it uses the component client method

  22. jonas’

    uhhh

  23. jonas’

    that'd be nasty and awesome

  24. jonas’

    I think I considered using that in the past

  25. Zash

    But since I would like Dialback to go away, of course it will come back and become mandatory again, just like vcard-temp :(

  26. singpolyma

    jonas’: iirc xmpp-proxy works for s2s by needing a module on the server side to accept cert auth information and such from it

  27. Guus

    this one? https://www.moparisthebest.com/mod_s2s_outgoing_proxy.lua

  28. Guus

    (taken from https://github.com/moparisthebest/xmpp-proxy/#how-do-i-adapt-my-running-prosody-config-to-use-this-instead )

  29. singpolyma

    I think so

  30. Zash

    Looks like that only overrides where outgoing connections are directed, in a way that will only work with older Prosody.

  31. Guus

    A little further down, there's another prosody script

  32. Guus

    It's all lua to me. ;)

  33. jonas’

    singpolyma, that's outbound, not inbound

  34. Guus

    There is this reference in the text, suggesting that a module is being pushed to a more central repo: "Until prosody-modules is updated"

  35. Zash

    Just looks like things that override the security checks.

  36. opal

    > But since I would like Dialback to go away, of course it will come back and become mandatory again, just like vcard-temp :( i assume with s2s mandatory tls recommendation, servers would just verify one another's certificates and that's the proof of a legit connection?

  37. opal

    >Has anyone worked on an approach that would allow you to terminate XMPP TLS on a load balancer, rather than on an XMPP server itself? i have only ever terminated incoming connections but outgoing ones are still made via the jabberd

  38. opal

    kind of the harsh reality of a monolithic network daemon

  39. moparisthebest

    Yes xmpp-proxy validates client cert for incoming s2s connections (and supplies it for outgoing) and the prosody module exists to make it accept SASL EXTERNAL auth implicitly (because xmpp-proxy won't even connect to prosody unless it's already succeeded)

  40. moparisthebest

    https://github.com/moparisthebest/xmpp-proxy/blob/master/contrib/prosody-modules/mod_secure_interfaces.lua this is the sasl external one

  41. nicoco

    Kev: Wouldn't it be reasonable to amend `Last Message Correction` to allow edits being targeted at the `<stanza-id>` in MUCs? I think it's a bit of a bookkeeping nightmare with with replies, retractions, reactions, and maybe future XEPs. I have submitted one issue in relation to reactions for dino* and I'll submit a 2 additional ones soon concerning replies in the context of edits and . I suspect the dino devs are not the only ones who will get confused when they implement. Maybe with a namespace version bump? * https://github.com/dino/dino/issues/1468

  42. moparisthebest

    https://github.com/moparisthebest/xmpp-proxy/blob/master/contrib/prosody-modules/mod_s2s_outgoing_proxy.lua is the redirect connections one that also does it

  43. nicoco

    Kev: Wouldn't it be reasonable to amend `Last Message Correction` to allow edits being targeted at the `<stanza-id>` in MUCs? I think it's a bit of a bookkeeping nightmare with with replies, retractions, reactions, and maybe future XEPs. I have submitted one issue in relation to reactions for dino* and I'll submit a 2 additional ones soon concerning replies in the context of edits and MAM. I suspect the dino devs are not the only ones who will get confused when they implement. Maybe with a namespace version bump? * https://github.com/dino/dino/issues/1468

  44. moparisthebest

    I didn't realize I had linked ancient versions of the module from the readme :( thanks Guus

  45. Guus

    > Yes xmpp-proxy validates client cert for incoming s2s connections (and supplies it for outgoing) and the prosody module exists to make it accept SASL EXTERNAL auth implicitly (because xmpp-proxy won't even connect to prosody unless it's already succeeded) That means one should avoid having a way connecting to the server outside of xmpp-proxy, I assume?

  46. moparisthebest

    Yes, at least with how this module is written

  47. moparisthebest

    If you made it only do it on certain ports that would be an alternative

  48. Guus

    or maybe have something silly as a shared secret?

  49. Guus

    anyway, not the point. It's all pretty interesting. It's slightly veering off from my load balancing topic (assuming it doesn't do that), but interesting, nonetheless.

  50. moparisthebest

    Right now it only connects to a single backend TCP port, but that could be made to randomly connect to one of a list easily, or that port could be load balanced

  51. Zash

    Obviosuly the web solution there is to add a proxy that load balances

  52. Menel

    Isn't srv records already ready to use for load balancing? Records with the same priority would balance per relative weight

  53. Zash

    The web shuns SRV records

  54. Menel

    Would be too elegant?

  55. Zash

    Only adding more and more proxies can be an acceptable solution on the web

  56. opal

    i tried setting up a secondary prosody server using appropriate SRV records but i stopped when i realised that it might not even be a supported configuration yet (i'll have to check again though)

  57. Guus

    SRV records can be handy, but it doesn't play nice with HTTP-based solutions. Also, it is perceived as more static of a configuration than what some load balancers allow you to do.

  58. moparisthebest

    slap xmpp-proxy in front and you can do both c2s and s2s over websockets :)

  59. Guus

    `client --[websocket]--> xmpp-proxy --[tcp]--> load-balancer --> xmppserver` ?

  60. Zash

    Guus, you need at least two HAproxy intsances and three nginx in that to advance to the next level

  61. singpolyma

    opal: doing it with SRV is sensible, but prosody specifically you need to be *very* careful using anything but a single node and for most uses it won't work or will only cause pain

  62. opal

    yeah my idea was just to have the replica with read-only access to the database for auth, and that way it would serve as a limited-availability fallback where users could just not modify their roster or somesuch, which is acceptable

  63. moparisthebest

    Guus: that'll work *now* yes, if you wanted naive load balancing in xmpp-proxy it'd be easy to add (just take a list of backend and randomly choose one to connect to)

  64. opal

    if prosody can let me do that then i could set it up that way and have postgres replication as well

  65. moparisthebest

    opal: you mean a limited-availibility fallback where users can't message other users on the same server and nothing else works, don't do it :P

  66. opal

    you just lose MAM, right?

  67. opal

    messaging is stateless after it's sent and as long as any plugins didn't hook into it

  68. Guus

    moparisthebest: I'm not explicitly looking for support. As I'm drafting Openfire documentation, I'm wondering about possible load balancing setups - this being possibly one of them - a bit of an outlier, maybe, but perhaps useful to someone.

  69. opal

    omemo has a few extra steps involved but i'm not too worried about that either

  70. opal

    i've run prosody with a downed postgres db, all it did was make sure i couldnt log in when i got disconnected

  71. opal

    i could still talk fine

  72. moparisthebest

    opal: but if you have prosody server A and B that both serve example.org and alice is on server A and bob on B they can't message each other, and outside servers will only be able to message one of them, it'll be a confusing mess

  73. moparisthebest

    Guus: sure, still something for me to think about so thanks :)

  74. singpolyma

    moparisthebest: well, the idea is to only use B if A is down

  75. opal

    moparisthebest, the intention is that server A is down, but yeah, i can see that scenario being unavoidable regardless (when server A comes back up and people don't disconnect from B)

  76. moparisthebest

    singpolyma: sure but you can't do that with only srv records

  77. opal

    so prosody would definitely need support for that :)

  78. opal

    definitely a split-brain problem inherent in xmpp, idk if backup xmpp servers ever were implemented properly? with mail it's a no-brainer, since mail supports relaying fine

  79. singpolyma

    For the "a comes back up" case you could kick everyone off B manually. But yeah, edges abound that's why I said. E careful

  80. singpolyma

    For the "a comes back up" case you could kick everyone off B manually. But yeah, edges abound that's why I said be careful

  81. opal

    mhm

  82. singpolyma

    If your server supports internal multinode coordination (such as ejabberd or jackal) then you can probably do this much more easily

  83. opal

    ohh ejabberd handles this ok... i had weird luck with that before, but i could definitely look at how it's implemented there

  84. opal

    "that" being "switching from prosody to ejabberd"

  85. opal

    so i switched back :p

  86. Kev

    You need to consider what type of redundancy you want, because it greatly affects how you implement the clustering code. E.g. some servers are just quorum-based, and a node is either in quorum and available, or not (I think jackal probably works this way, as it's etcd behind the scenes, I think), other servers (e.g. M-Link) degrade down to single node operation with eventual consistency, so that e.g. two sites that lose connectivity can continue to operate locally.

  87. opal

    "eventual consistency" seems like one of those things to introduce even more unpredictability to the end-user experience; i'd honestly rather have a "dumber" fallback in lower prio of SRV so at least people know when service is degraded (by receiving errors on certain operations)

  88. Kev

    Like I say - it depends what you want.

  89. opal

    call me too careful but thats my thought process, especially having had to deal with other areas of xmpp where clients get confused on one server :p

  90. opal

    yep

  91. opal

    i hear "my client cant decide which avatar to show" too often

  92. Guus

    Although Openfire-specific, I'd love some feedback on the load balancing documentation that I've drafted in https://github.com/igniterealtime/Openfire/pull/2224 - if only to confirm that I'm not writing absolute untruths, or to highlight something that would be good to add.

  93. opal

    oh Guus so openfire supports what we were talking about, nice

  94. opal

    i'm giving it a read

  95. opal

    https://github.com/igniterealtime/Openfire/pull/2224/files#diff-b9adf940bc94bbf75fb3c7174f963478a950e06f466e3e02cc3fb9709be9785bR60 superfluous apostrophe you cite your rfcs, srv priority example is right, the rest looks openfire-specific so you would know more about that than me, but yeah it all looks good

  96. Guus

    Thanks!

  97. moparisthebest

    xmpp-proxy doesn't do BOSH (yet?) only starttls, direct TLS, websocket, quic

  98. moparisthebest

    Otherwise looks good!

  99. Guus

    Thanks! No obvious omissions? It is hard to think of the thing that you're not thinking of...

  100. Guus

    (I removed the BOSH reference with xmpp-proxy)

  101. opal

    merge it lol

  102. opal

    additions will come

  103. Guus

    sure, nothing gets so much attention and maintenance as documentation! ;)

  104. opal

    oh believe me theres always one person lurking like a hawk and then they email you when you already know about it

  105. opal

    (im that person sometimes)

  106. Guus

    Happy to be on your list now :)

  107. Guus

    (it's merged)

  108. opal

    nice

  109. lovetox

    nicoco, about your corrections question, this would not work in MUCs without MAM. This also does not work in single chat. Why would you want a approach that works in all conditions (message-id) to change, where i suddenly have to consider the context

  110. lovetox

    i find this way worse from a implementation standpoint

  111. lovetox

    I compiled a table

  112. lovetox

    XEP-0308 (Corrections) Message ID XEP-0333 (Marker) Message ID / Stanza ID XEP-0444 (Reactions) Message ID / Stanza ID XEP-0461 (Replies) Message ID / Origin ID / Stanza ID XEP-0424 (Retraction) Origin ID XEP-0425 (Moderation) Stanza ID

  113. lovetox

    For Corrections, stanza-id makes not much sense

  114. lovetox

    you can always correct only your own messages, so if we want to move a way from message-id to signal that unique id is in use, origin-id would be better

  115. singpolyma

    Doesn't message@id be problematic in MUC because the MUC is in no way required to preserve the ID attribute to all recipients of a message?

  116. lovetox

    there is no reason to depend on server generated ids for the correction usecase

  117. singpolyma

    I thought that's the while reason replies etc talk about <stanza-id.

  118. singpolyma

    I thought that's the while reason replies etc talk about <stanza-id>

  119. singpolyma

    I thought that's the whiole reason replies etc talk about <stanza-id>

  120. Kev

    > Doesn't message@id be problematic in MUC because the MUC is in no way required to preserve the ID attribute to all recipients of a message? That was historically true, but isn't any more, unless I'm misremembering.

  121. singpolyma

    I thought that's the whole reason replies etc talk about <stanza-id>

  122. lovetox

    yes this was changed in the MUC XEP

  123. singpolyma

    MUC xep requires ID attribute preservation now?

  124. lovetox

    and there is no relevant amount of servers in the wild that dont do this

  125. singpolyma

    So we can maybe remove the <stanza-id> stuff from other xeps also?

  126. lovetox

    About what XEP are you talking exactly?

  127. lovetox

    stanza-id was not only considered because of that problem with MUCs

  128. lovetox

    there are other reasons depending on the XEP

  129. singpolyma

    Reactions, replies, retractions, moderation

  130. lovetox

    did you see my table above?

  131. MattJ

    There was only ever (to my knowledge) a single (not open-source) implementation that didn't preserve message@id through MUCs, and it's my understanding that even that implementation changed many years ago. origin-id was created as a workaround for that, but stanza-id was not.

  132. lovetox

    retractions does not use stanza-id

  133. lovetox

    moderation is a good use case for stanza-id, because i moderate a message in the server archive

  134. lovetox

    its only MUC context

  135. lovetox

    there is no moderation in single chat

  136. singpolyma

    MattJ: biboumi also does not I bet, but that's not super relevant for these xeps

  137. MattJ

    <stanza-id/> used to be <archived by="server" id="0b359a68-2ca5-11ee-aa94-2f606f872410"/>

  138. Kev

    origin-in can (theoretically) just go away at this point.

  139. Kev

    origin-id can (theoretically) just go away at this point.

  140. MattJ

    (in the MAM namespace)

  141. Kev

    But you still need other entities to be able to put an id on something going through, e.g. MAM.

  142. MattJ

    But then it was suggested that we should make the ids generic, beyond MAM

  143. MattJ

    Hence stanza-id

  144. Kev

    What Matt says :)

  145. lovetox

    Kev, i would argue origin-id is good because a client can signal he understand the concept of unique ids and uses it

  146. MattJ

    lovetox, might as well just say that every client using unique ids should put a certain prefix on the attribute value

  147. singpolyma

    We only have stanza-id because message@id isn't required to exist or be unique, basically. But some of these xeps could just say "if you implement this xep you need unique IDs" like corrections does

  148. MattJ

    That saves another element and confusion between all the different ids

  149. lovetox

    yeah if you design a protocol new

  150. lovetox

    now it would be a breaking change, to save a few bytes

  151. lovetox

    not worth it

  152. lovetox

    > We only have stanza-id because message@id isn't required to exist or be unique

  153. lovetox

    thats not true at all

  154. lovetox

    the server needs to assign its own id

  155. lovetox

    you cannot build a protocol where you hope that all clients use unique ids and insert this into your archive ..

  156. singpolyma

    How is that different from what I said?

  157. singpolyma

    The issue is that message@id may not be unique

  158. lovetox

    you implied that if there was a standard that says message-id MUST be unique

  159. lovetox

    message archives would need no stanza-id

  160. lovetox

    what im getting at is the word "required"

  161. lovetox

    it would make no difference if we write a standard and "require" it

  162. lovetox

    because there is no way to verify uniquness

  163. singpolyma

    We could debate that edge but for now it doesn't matter since the spec doesn't even require message@id to be present so it's pretty moot

  164. lovetox

    yes

  165. singpolyma

    But these newer xeps could require it

  166. lovetox

    there are XEPs that reference your own messages, they should use origin-id or message-id (if backwards compatibility is needed)

  167. lovetox

    there are XEPs that reference other peoples messages, and there in MUC its nice to use stanza-id because all messages are reflected by the server

  168. singpolyma

    But it would be nicer not to need to use stanza-id

  169. lovetox

    yes

  170. lovetox

    i think it would be best if they all switch to origin-id

  171. lovetox

    its nice though that stanza-id cannot be forged

  172. singpolyma

    They already usually use message@id for 1:1 and then for muc say "or maybe stanza-id" I think maybe we can just remove that maybe stanza-id part...

  173. lovetox

    i think in MUC, stanza-id, single context origin-id

  174. lovetox

    with stanza-id you dont have to think about clients faking id

  175. lovetox

    thats a big plus

  176. singpolyma

    Hmm. So the worry is that because you react by id only and not also sender what if a second sender does inb4 with same id? Hmm

  177. lovetox

    and in single context, it makes no sense to fake id

  178. MattJ

    FWIW I lean towards using the archive id for as much as possible, generally

  179. lovetox

    in MUC

  180. MattJ

    It's only a pain for the period of time where the sender does not know what it is

  181. lovetox

    in single context it makes no sense

  182. lovetox

    there is no gain in single context, only complexity

  183. lovetox

    there is no attack vector

  184. lovetox

    a contact that sabotages ids in single context, only sabotages itself

  185. lovetox

    and you can simply block him, and stop talking to him

  186. lovetox

    in MUC you can really get on peoples nerves and make chaos

  187. singpolyma

    I really hate that stanza-id exists at all, but I guess since we have it, now that this vector has been explained to me I understand the need better for these attachment in muc cases

  188. MattJ

    Why do you hate that it exists?

  189. MattJ

    You think message archives should be keyed by the ids chosen by third parties?

  190. lovetox

    i think by accident we are in pretty good shape actually with the XEPs

  191. lovetox

    all XEPs that reference other peoples messages, use Stanza ID in MUC

  192. lovetox

    and origin-id / message-id in single chat

  193. MattJ

    I think it might be okay to dislike some applications of it, but in my head it's <archived by="" id=""/>, and that's desired, but then it also happens to be a useful identifier for other things to reference

  194. singpolyma

    If I were starting from scratch yeah, sender chosen IDs with namespacing by sender. Basically like how we do with email

  195. singpolyma

    > all XEPs that reference other peoples messages, use Stanza ID in MUC Yes. This is just annoying for implemetation. But I understand why it is that way now

  196. lovetox

    and XEPs that reference your own message, its fine to use origin-id/message-id because receiver will validate the sender anyway

  197. singpolyma

    For stuff I send to 1:1 is something like self-carbons out there to discover the mam id?

  198. MattJ

    No, but it has been on my radar for years as something that needs to exist

  199. MattJ

    An alternative that was discussed at some summit was deterministic ids, which I do find attractive, but I think it has too many edge cases

  200. singpolyma

    Like mam id generated from message@id for sender only?

  201. MattJ

    The suggestion was to do something like hash(stream_id + counter)

  202. MattJ

    That way the client and server both agree (in theory) on what the id of each stanza would be

  203. singpolyma

    Could do mam id of. message@id + resource gets you the same thing with no possible desync

  204. singpolyma

    If client negotiates something useful about promising to send ids of course

  205. MattJ

    That relies on the client sending unique ids

  206. MattJ

    Server developers have a (deserved, IMHO) distrust of clients' ability to do that :)

  207. singpolyma

    Yes. So client would have to advertise such to the server

  208. singpolyma

    Well, if your client lies all it can do is mess up your own archive of your own sends

  209. singpolyma

    Server can also return error on duplicate id

  210. lovetox

    but why consider this, if there is a possibility to make it not happen?

  211. lovetox

    hash(streamid + counter) is easy enough

  212. singpolyma

    > hash(streamid + counter) is easy enough This sounds like a way to make everything always broken

  213. singpolyma

    Also, why hash? Just streamid + counter but counters are very brittle

  214. lovetox

    we use counters with streammanagement all the time

  215. MattJ

    Yeah, and clients get them wrong all the time :)

  216. MattJ

    (you can see this in the logs of most public servers)

  217. lovetox

    the server can simply send an error if he calculates a different id

  218. lovetox

    and reject the message

  219. singpolyma

    Different than what?

  220. lovetox

    server is at counter 10

  221. lovetox

    client sends counter 1

  222. lovetox

    server rejects, because client cant count correctly

  223. singpolyma

    Where is client sending the counter?

  224. lovetox

    no message is sent

  225. lovetox

    yeah true, nobody said that

  226. lovetox

    i assumed it

  227. lovetox

    we use it as message-id

  228. lovetox

    or something

  229. singpolyma

    Right. So just use message@id but only if it fits some rules we can quickly verify

  230. singpolyma

    Server returns error if you break the rules

  231. singpolyma

    Rules can be "no dupes" or "count right" either is fine by me. I like this general idea

  232. singpolyma

    Benefit to using counter (now we're getting crazy) server could use it as a SM assertion also

  233. lovetox

    the pain with this is always, that clients need to support the old behavior anyway

  234. lovetox

    but if you dont start you will never come to a place where you can drop it

  235. lovetox

    sounds good enough, can be negotiated at stream start, was there any concerns, or just nobody moved forward with this?

  236. singpolyma

    For sure

  237. lovetox

    oh it would be in the MAM Xep, so MattJ would be the author :D

  238. MattJ

    There was a thread on the mailing list somewhere about it (which of course I can't link to right now)

  239. singpolyma

    I like this because it also strongly encourages good message@id at the expense of not being able to use uuid if we do the counter thing

  240. MattJ

    Well, certain things that are currently deployed may break

  241. MattJ

    For example, anything that encodes meaning into id attributes, which isn't commonly done, but there are definitely things that do

  242. singpolyma

    Oh yeah, I do all the time, but not from client

  243. MattJ

    Also at least Prosody delegates choosing an archive id for a message to the storage backend, and this is in active use

  244. lovetox

    message id was just an idea, but as the mam id is only relevant for ourself

  245. lovetox

    there is no reason to not just simply add a new element where we communicate this

  246. lovetox

    OR

  247. singpolyma

    I don't think new element helps anything here. Yet another element with the same content in it

  248. lovetox

    hmm .. message-id is not only for yourself

  249. lovetox

    its for other people

  250. lovetox

    MAM id is only for yourself

  251. singpolyma

    But with this we can make them the same which is a big benefit

  252. singpolyma

    The issue is if as MattJ says you have a storage system that needs IDs to be a certain way (maybe wants them sortable or whatever) then this might not be an option

  253. lovetox

    why?

  254. lovetox

    the db does not need to use this id as its sort id

  255. MattJ

    In some cases it might

  256. lovetox

    it simply can apply a integer entity key to the row

  257. MattJ

    Not everything is an SQL database :)

  258. lovetox

    oh wait .... could this be our sortable mam id

  259. lovetox

    but where is the problem, any streamid + counter is sortable

  260. lovetox

    how can it be ever not sortable?

  261. lovetox

    ah stream id changes on every connect

  262. MattJ

    It's not just about being sortable, but that the server might encode information into the id

  263. MattJ

    also while we're on the topic: stream id is traditionally considered sensitive

  264. MattJ

    and without doing a full review of whether anything still depends on that, it ought to stay that way

  265. lovetox

    then dont use the stream id, and simply communicate a mam context id in negotation

  266. MattJ

    Sure

  267. lovetox

    was there not a new standard about sortable UUIDs

  268. lovetox

    take that + counter

  269. lovetox

    but at this point why even use UUID

  270. lovetox

    server can simply generate a sequential id on every connect

  271. lovetox

    perfect, a id that is convertable to a integer

  272. lovetox

    where is the downside to this, that solves so many problems

  273. lovetox

    even the one i talked about a few days ago with keeping the sequence with backwards mam queries

  274. lovetox

    ah .. no that was MUC

  275. lovetox

    though MUC can simply use sortable IDs ..

  276. singpolyma

    ... why would stream ID be sensitive?

  277. singpolyma

    I agree we can use some other thing (resource, new mam ctx id) if needed, but that seems like an odd thing to be sensitive

  278. lovetox

    oh wait, this would not work at all, if we simply add a counter, it would only be sortable within our sent messages

  279. lovetox

    not the received ones

  280. MattJ

    singpolyma, it has at various times been used as a nonce-like value for input to various things, such as authentication

  281. singpolyma

    lovetox: correct

  282. singpolyma

    MattJ: ah, hmm. Ok

  283. singpolyma

    Alternative is to send down a message with same message@id and a stanza id child after mam recording. Or just be lazy and do full self carbons

  284. lovetox

    this would also serve kind of as acknowledge that the message reached the server

  285. lovetox

    like we have in MUC

  286. MattJ

    I've been leaning towards self-carbons for some time

  287. MattJ

    I tried to get it into the XEP before it was advanced (even as an optional feature), but it was generally opposed as the carbons protocol had been "stable" for some time

  288. MattJ

    and then I lost momentum

  289. nicoco

    Hum OK. Seems like, at least in groupchats, having everything relating to stanza ID when present makes more sense to me. I think I handle that correctly btw (happy to take reports if I don't), but > XEP-0461 (Replies) Message ID / Origin ID / Stanza ID In group chats, it's necessarily stanza-id according to the business rules. Are there cases where message id and origin-id are different?

  290. MattJ

    There shouldn't be, but who knows

  291. lovetox

    no, just cases where origin-id is not there

  292. MattJ

    I'm 100% behind dropping origin-id everywhere

  293. MattJ

    Whenever it is used you already have to deal with it being absent

  294. lovetox

    yeah and? thats called a migration

  295. lovetox

    with that argument we could never migrate to something new

  296. MattJ

    A pointless migration, because you can just stay with @id

  297. MattJ

    We just add an extra element for no reason

  298. lovetox

    no, because it does not carry the semantic that the client understands unique ids

  299. MattJ

    Why do you need that?

  300. lovetox

    its just nice, to legacy clients, to not confuse them with stuff that will break them

  301. MattJ

    If the client does not use unique ids, what changes?

  302. lovetox

    except we say such thing does not exist anymore

  303. lovetox

    then im fine with message id

  304. lovetox

    i guess it only affects corrections

  305. lovetox

    corrections is the oldes XEP of the bunch

  306. lovetox

    with anything newer we could expect client to support unique ids

  307. lovetox

    but yeah im fine with it, if we just say, fuck clients that dont use unique ids

  308. MattJ

    Right

  309. MattJ

    and in RFC6120bis we tighten up the wording for @id to make this clear

  310. MattJ

    Then we only have two ids again, the one assigned by the client, and the one assigned by the server (and both are useful in different contexts)

  311. lovetox

    XEP-0461 (Replies) XEP-0424 (Retraction) before they advance they would need to be changed, because the both use origin id

  312. lovetox

    that reminds me to use message-id when implementing those xeps, as they should anyway always the same as origin-id

  313. lovetox

    retraction particular makes not much sense if i think about it

  314. lovetox

    its about retracting my own messages, why would anyone shoot himself in the foot and use non unique ids, and then implement retraction

  315. MattJ

    It could be retracting a message sent from another client

  316. MattJ

    But if that client is using non-unique ids, it also won't have origin-id anyway, so retraction still wouldn't work

  317. Zash

    Id references ought to have some scope scheme for specifying which origin the id was set by

  318. lovetox

    MattJ, but that is exactly that case where it would be useful to know if the other client set a unique id

  319. lovetox

    otherwise i retract 100 message instead of one by accident

  320. lovetox

    i dont understand your argument that retraction would not work

  321. lovetox

    if i have a worst case client that sets the same message id for every message, and i retract that, it will retract all messages

  322. Zash

    lovetox, do you have some legitimate reason to do it like that, rather than limiting retraction/whatever action to the last message with a particular id?

  323. Zash

    lovetox, do you have some specific reason to do it like that, rather than limiting retraction/whatever action to the last message with a particular id?

  324. Zash

    In SQL terms, some `LIMIT 1` and `ORDER BY` clauses would solve it, or `break` out of the loop that does the update.

  325. Zash

    Punishing whoever were being silly by reusing IDs instead of doing something weird like affecting many messages seems sensible to me.

  326. opal

    > in MUC you can really get on peoples nerves and make chaos after being on irc enough and being on networks / irc-ish protocols that dont support moderation, and also taking from nntp/usenet style moderation, i prefer better filtering tools over any sort of "group moderation"

  327. opal

    but thats probably a cultural difference from how others want it

  328. opal

    idk

  329. opal

    sometimes people dont know what they want til they have it

  330. opal

    soulseek is unmoderated too so people just ban/ignore whoever they want

  331. opal

    in that vein, most xmpp clients have a tough time ignoring a user in a muc even though it's as simple as blocking the muc@example.org/nick

  332. opal

    just isnt exposed properly in half of clients i used

  333. singpolyma

    opal: you want xmpp "killfile"?

  334. opal

    pretty much

  335. lovetox

    Zash, currently i JOIN the info if a message is retracted, so i dont think this is possible

  336. opal

    i'd leave my own MUC unmoderated if i could just easily ignore anyone lol

  337. opal

    even though it's a topical channel for my project

  338. opal

    im too old-internet to care

  339. lovetox

    opal, ignoring is a tool for a user, thats not moderation

  340. lovetox

    you need to think of stuff like, that your server archive fills with spam, other sources that access your archive, like weblogs, where readers then cannot ignore something

  341. lovetox

    not saying that its not a useful tool for a user, but i wouldnt say it does replace moderation

  342. opal

    i have radical views on moderation i'll just save my breath

  343. MSavoritias fae.ve

    yeah i think both approaches are key here.

  344. opal

    i do understand the point about archives being trashed but in my head i never trust a server more than any individual user

  345. opal

    thats how i would design communication protocols, thats all

  346. opal

    xmpp pre-dates me so i cant really say anything to change what we have now

  347. opal

    web-of-trust style filtering never took off anywhere either cus thats complex to implement in such a way where it's also intuitive at a ux level

  348. opal

    and, im not cocky enough to rush that and fill the gap yet

  349. singpolyma

    > web-of-trust style filtering never took off anywhere either cus thats complex to implement in such a way where it's also intuitive at a ux level Except Facebook

  350. opal

    oh yeah, the Algorithm

  351. opal

    brb phoning up my buddy zuck

  352. singpolyma

    opal: how would you feel about a "local block" for muc that still shows the blocked person sent a message, but not what they said? So you know what people are reacting to, etc

  353. opal

    sounds like what discord does; and i mean, tombstone stanzas can definitely be sent regardless, so the client can choose to show a message or hide it depending on what the user wants

  354. opal

    when i ignore someone i personally want to pretend they dont exist

  355. lovetox

    the question for the developer is, should i still save the message

  356. opal

    yeah theres that too

  357. opal

    (reminds me of weechat /filter)

  358. lovetox

    would definitly make it a lot easier, but i guess most users would say: no

  359. opal

    yeah a lot of users want a more hierarchical experience cus its what theyre used to and theyre able to trust people more than i can

  360. lovetox

    and if no, then i have to design my whole application for that, constantly expecting that references to that message are received but its not existent and handle that gracefully

  361. lovetox

    i guess we have to anyway

  362. lovetox

    i have this block feature on my long list of things

  363. opal

    years ago i was toying with creating a chat protocol and then just had total burnout dealing with anything related to designing a communication protocol lol

  364. opal

    might toy with it later though

  365. singpolyma

    I personally find the tombstone UI less confusing, but yes it would also be slightly easier for me to build

  366. MSavoritias fae.ve

    > yeah a lot of users want a more hierarchical experience cus its what theyre used to and theyre able to trust people more than i can hierarchical and free for all are not the only choices though. a community can still make their space safe without having a single dictator or an oligarchy.

  367. MSavoritias fae.ve

    and of course networks of consent and web of trust are another layer on that.