Modern XMPP project discussion - 2019-09-13


  1. Daniel

    is there a best practices on which of the 3+ delays to show? I muc message might have 1) a delay tag from the user who sent it (because they were out of wifi for a second) 2) a delay from the muc history 3) a delay from your local stream management

  2. Daniel

    just show all of them?

  3. jonas’

    Daniel, in MUC, I’d use the one from the MUC history if available

  4. jonas’

    otherwise, the one from the user, but order by the one from your local stream management

  5. jonas’

    otherwise, show the one from the user, but order by the one from your local stream management

  6. Daniel

    yes i was thinking of storing different values for ordering and showing (which i don’t currently)

  7. Daniel

    isn’t that slightly irritating to the user though?

  8. Daniel

    if messages show 'out of order'

  9. jonas’

    my clients have been doing that since forevers

  10. jonas’

    (my = the ones I use)

  11. Ge0rG

    I'm extracting one timestamp from the message and use that for ordering as well as display

  12. jonas’

    I may not be the norm, but I think why this makes sense is because the ordering reflects the actual way things happened and the original timestamp reflects how they were intended to happen

  13. Daniel

    yes that's what i'm doing. but i get the argument for doing what jonas’ said

  14. Ge0rG

    jonas’: it will do horrible things on MAM backsync

  15. jonas’

    Ge0rG, only if you sync by timestamps

  16. jonas’

    if you do that, you’re doing weird things anyways

  17. Daniel

    i could argue that what jonas is seeing is mostly an accident caused by append only txt files as storage rather than a conscious by the developer

  18. Daniel

    that said it might be a good accident

  19. jonas’

    Daniel, that’s certainly true

  20. jonas’

    and I think, yes, it’s a good accident

  21. jonas’

    at the very least, showing a "this message was delayed" thing may be sensible.

  22. Ge0rG

    jonas’: no, if you sync by received-order

  23. jonas’

    makes it less confusing when stuff arrives late

  24. Ge0rG

    /* Obtain a timestamp from a message, in the following priority order: https://prosody.im/modernxmpp-paste/db89ed61-677e-42e2-8319-6982f2375956

  25. Ge0rG

    ah, thanks mod_pastebin for stripping my XHTML-IM

  26. Zash

    You're most welcome

  27. Daniel

    pastebin mod is way to aggressive in my opinion

  28. Daniel

    noticed that as well now that i'm lurking in prosody chat

  29. Ge0rG

    Daniel: luckily, it's a server-setting thing

  30. Zash

    Also advertised in disco

  31. Daniel

    i currently just use the oldest timestamp (which is weird i admit that)

  32. Zash

    4 lines or 500 characters is the default, which seems fine to someone like me whos used to IRC

  33. Holger

    Haha I was just going to write: IRC emulation. Plain MUC doesn't support IRC's 512 char limit.

  34. Holger

    XMPP clients should just adjust by splitting up messages like IRC clients do.

  35. Zash

    People tend to do that manually 😞

  36. Ge0rG

    Holger: biboumi will do that for you

  37. Ge0rG

    Holger: also https://github.com/yaxim-org/yaxim/blob/master/src/org/yaxim/androidclient/service/SmackableImp.java#L1987-L1998

  38. Zash

    Figure out how to handle pastes of large config files, logs, etc in a nice way.

  39. jonas’

    Zash, run `file(1)` against the message, if it looks like a config file, pastebin! ;)

  40. Zash

    And find the precise point where it the chat turns into a forum.

  41. Ge0rG

    mod_muc_firewall!

  42. Holger

    25 lines, 2000 characters. That way a message won't exceed a VT100 display.

  43. Zash

    Also, limits on size in a broadcast medium is sane.

  44. Holger

    I'm not arguing against limits, just that those limits seem too restrictive to me, as they seem to catch 'legitimate' message quite regularly. I'm usually not motivated to follow an HTTP URL just to read a 5-line message. (But I don't do Prosody support anyway so whatever.)

  45. Zash

    To me it looks like if you increase it, people will increase their message sizes.

  46. Zash

    And then it turns into a forum

  47. Ge0rG

    Zash: how did you arrive at that conclusion?

  48. Zash

    Observation of the Converse.js room where it's been increased a bit

  49. Holger

    Really? I would not have expected people to even be aware of those limits, let alone restricting themselves regarding message size.

  50. Ge0rG

    Yeah, there is no way people take these limits into account. I'm not, and I know about them. Most of the time

  51. Holger

    Well ok, I have no learnt not to split up citations/comments into several lines to increase readability.

  52. Holger

    *now

  53. Daniel

    Hi Zash, https://prosody.im/modernxmpp-paste/4e1f102a-d9b1-462d-a885-81b6fb60c15b

  54. Holger

    Messages in the ejabberd room are too short most of the time :-)

  55. Holger

    "hey it doesn't work"

  56. Ge0rG

    Did you know that you can easily split multi-line messages into individual messages?

  57. Holger

    rocket

  58. Holger

    science

  59. Holger

    .

  60. Daniel

    which is a different kind of annoying

  61. Holger

    *beep* *beep* *beep*

  62. Zash

    Which kind of annoying do you want?

  63. Ge0rG

    Zash: I want to be annoyed by long messages in the chat log, not by having to open the browser. kthx

  64. Zash

    Maybe it makes less sense here, less likely to be long config files and logs paste.

  65. Zash

    I don't have access atm tho

  66. Ge0rG

    I can see how pasting long things is bad on IRC, but here, really, with XHTML-IM syntax highlighting, it's very much usable

  67. jonas’

    no, because your coloring is unreadable on my black background

  68. Zash

    Can we compromise on loading a module that wipes styles from your XHTML-IM?

  69. Ge0rG

    MUC presence is the annoying stuff

  70. Ge0rG

    jonas’: I'm using a dark blue background and it works rather well

  71. Zash

    MattJ, refiddle mod_pastebin?

  72. Ge0rG

    Zash: limit colors to a value from the 0392 palette

  73. pep.

    https://issues.prosody.im/1411 because I also don't like the default limits (I don't load it on my mucs and generally it's fine) :x

  74. Ge0rG

    it's less bad than muc_limits though

  75. Ge0rG

    If I wanted to annoy this MUC and its occupants, I'd make use of something like /dice or /progress in poezio, to create a long trace of LMCs

  76. pep.

    Especially with poezio not doing LMC properly (as per some newish revision)

  77. Daniel

    sigh i need to 'fix' this as well

  78. mathieui

    Ge0rG, did you know that initial implementation of such useless plugins made poezio crash when enabling debug logs in the beginning due to the python recursion hard limit?

  79. Ge0rG

    we better not tell Link Mauve about the possibility to combine XHTML-LM, libaa and LMC for ASCII art video streaming.

  80. jonas’

    moohahahaha

  81. pep.

    hahaha

  82. Daniel

    the 4 different clients that allegedly are doing LMC need to have a switch day

  83. pep.

    Daniel, switch day?

  84. Ge0rG

    mathieui: this is a sign of the insufficiencies in the plugin architecture

  85. mathieui

    Ge0rG, what plugin architecture?

  86. Ge0rG

    mathieui: yes

  87. mathieui

    it was crashing when *receiving* the corrections and priting the message objets to the debug log

  88. mathieui

    inside the display code

  89. Ge0rG

    mathieui: oh, so it was not about the plugins but about messages with too many corrections?

  90. mathieui

    yeah

  91. Ge0rG

    mathieui: that's a security issue.

  92. Daniel

    also 'fixing' lmc will fuck with MAM

  93. Ge0rG

    Daniel: what are you speaking about?

  94. pep.

    Daniel, I guess that's more or less fine tbh. As long as you can still see messages

  95. Daniel

    well if i don’t make the old message id the new message id on the next catchup the last message id will still be the old

  96. Ge0rG

    Daniel: I think you need to make a drawing. With message trees

  97. pep.

    Yeah I get what you mean, and I think that's fine..

  98. pep.

    Can we LMC an LMC?

  99. pep.

    In the current XEP view

  100. Daniel

    you can correct a message multiple times yes

  101. Ge0rG

    pep.: no, it's not allowed.

  102. pep.

    Not what I meant

  103. pep.

    Ge0rG, ok

  104. Ge0rG

    pep.: there was a very heated debate about that, because I think that we need to LMC the last LMC and not the original, but it was decided otherwise

  105. pep.

    I remember the heated debate but not the content

  106. Ge0rG

    pep.: by the XEP, you always send LMCs referencing the original message. Therefore, if multiple corrections get reordered, you don't know which came first.

  107. pep.

    "get reordered"?

  108. Ge0rG

    pep.: if you see them in a different order than they were sent

  109. pep.

    I get wha tyou mean anyway

  110. Ge0rG

    e.g. because you load parts of the conversation from MAM

  111. pep.

    yeah, you now need some external information to know the order

  112. Daniel

    also do i need to bump Conversations to 3.0.0 when i 'fix' LMC?

  113. pep.

    hmm why?

  114. Daniel

    breaking changes

  115. Ge0rG

    Daniel: I'm still not getting your context

  116. pep.

    I think that's a very not-so-much-annoying breaking change

  117. pep.

    What will happen is that you will potentially not recognize old LMCs as LMC, and display them as normal messages, that's it

  118. pep.

    fwiw, it's already like that in the wild. Converse has been doing it as the LMC says all this time

  119. Daniel

    well you don’t have to deal with the fallout on my issue tracker

  120. pep.

    as the XEP says*

  121. pep.

    It works for the first message

  122. pep.

    Which is 99% of the use-cases I guess

  123. pep.

    So sure you'll break all the rest, but a few clients are already incompatible anyway.. if I use converse and then login with conversations, I don't see the same

  124. Daniel

    also i need to rethink all my deduplication logic

  125. Ge0rG

    what are you talking about?

  126. pep.

    That makes me think, I'm not sure we're handling anything coming from MAM, LMCs, etc. :x

  127. pep.

    Ge0rG, which part?

  128. Ge0rG

    pep.: the last 13 minutes

  129. pep.

    Changing how LMC is handled in a client?

  130. Ge0rG

    Changing in which way?

  131. pep.

    Reading / writing. I guess Daniel was also referencing the last ID

  132. pep.

    and not the original

  133. Ge0rG

    Sorry, I can't follow

  134. pep.

    I'm not sure what part of the context you're missing

  135. pep.

    (in this infinity of contexts, please give me one I need to specify better)

  136. Ge0rG

    All of it, apparently. The last thing that I understood was a recursion problem in poezio

  137. pep.

    hah, yeah that's not related I guess

  138. pep.

    The LMC XEP has been changed right

  139. pep.

    You mentioned the heated debate

  140. Ge0rG

    yaxim will store the original ID and the last-correction ID in its database, and match an incoming LMC against either; so it will technically be able to use both formats

  141. Ge0rG

    pep.: the XEP wasn't changed, it was clarified to underline the original design

  142. pep.

    Yeah ok

  143. pep.

    Sure

  144. pep.

    "clarified"

  145. jonas’

    #clarified should be the new label we put on things which are disguised breaking changes :)

  146. Daniel

    no looking at my code this completly breaks my MAM catchup and dedup behaviour

  147. Ge0rG

    > If the same message is to be corrected several times, the id of the original message is used in each case (e.g. If a message of id 1 is corrected by a message of id 2, a subsequent correction should correct 1, not 2).

  148. pep.

    Daniel, you can technically allow both behaviours if you want

  149. pep.

    To not have to change the world

  150. Ge0rG

    with the existing implementations being inconsistent in that regard, accepting both is a sane approach

  151. Ge0rG

    Unless you are a proponent of https://tools.ietf.org/id/draft-thomson-postel-was-wrong-03.html

  152. Ge0rG

    In which case, you probably should show the user a popup if an incoming LMC is referencing a previous LMC

  153. pep.

    hmm

  154. Daniel

    mhhh maybe i should indeed support both. and build read support

  155. Daniel

    and then ship write support in a year

  156. Daniel

    or so

  157. Ge0rG

    what's "read support" and what's "write support"?

  158. Ge0rG

    I thought Conversations already does LMC?

  159. Daniel

    sending corrections out in the new format

  160. Daniel

    would be write

  161. Daniel

    pep., and converse does the new format you say? so i can use that to test

  162. pep.

    yeah it does

  163. pep.

    that's also how I noticed poezio wasn't

  164. pep.

    But Ge0rG had noticed before! Always first!!

  165. pep.

    https://lab.louiz.org/poezio/poezio/issues/3462

  166. Ge0rG

    I'll keep sending the latest-correction-ID as a matter of principle

  167. Daniel

    oh also LMC will probably start doing funny things once we start using stanza-ids in mucs for that

  168. Daniel

    which again I'm sure will just be a clarification

  169. Daniel

    i mean hasn’t it always been obvious that we should use the stanza-id

  170. Ge0rG

    stanza ids or stanza-ids?

  171. Ge0rG

    how do you LMC a message that wasn't yet reflected to you?

  172. Ge0rG

    how do you attach-to a message that wasn't yet reflected to you?

  173. Ge0rG

    If we start using MAM IDs in 1:1 communications, we'll have to wait until the next re-connect to obtain the MAM IDs of our sent messages.

  174. Ge0rG

    "please reconnect to the server so you can append an emoji to your witty remark"

  175. Daniel

    i mean my code is slowly moving toward yolo message correction

  176. Daniel

    you can now put any id of any of the previous versions in and it will probably do something

  177. Daniel

    so what ever message arrived last will win

  178. Daniel

    now we just need to relax our rules on what 'last' means and what resources are

  179. Daniel

    and anyone can correct anything at any time

  180. Daniel

    that reminds me that i wanted to write a channel bot that; if soon as someone leaves will rename itself to that user and send a LMC for the last message that user has written

  181. pep.

    Daniel, only from their barejid right

  182. pep.

    And that bot wouldn't work with occupant-id (or similar)

  183. Daniel

    wouldn’t…

  184. Daniel

    only that we don’t have occupant-ids

  185. Daniel

    and people will still mess that up

  186. pep.

    There's a prosody module \o/ (and one known bug I need to fix).

  187. pep.

    (And a XEP)

  188. pep.

    Though..

  189. pep.

    MattJ reminded me of jid-proxy, that would probably fit better in the whole picture

  190. pep.

    So I guess we can have something similar to occupant-id but used as "realjids". Maybe? Clients would know they're not real anyway since the MUC declares itself as semi-anon

  191. pep.

    We can reuse the same IDs as occupant-ids for the localpart, but then we need a namespace we can use (another (sub)domain)

  192. pep.

    Would these have to be routable?

  193. MattJ

    Clients will try to PM them, query them for vcards and other nonsense

  194. MattJ

    so pretty much what they do with in-room occupant JIDs

  195. pep.

    right

  196. pep.

    We can just tell them "nope"? As in, have the MUC reply that

  197. MattJ

    Sure, though then PMs and vcards break

  198. MattJ

    and I deem that unacceptable, since we are for some reason discussing this in a MUC primarily dedicated to UX :)

  199. pep.

    I wonder if there's anything in MUC that says you should not expect/use item@jid in a semi-anon MUC

  200. pep. looks

  201. MattJ

    Since it's not defined for the server to send it, I highly doubt it

  202. pep.

    it?

  203. pep.

    (the second one of the three)

  204. MattJ

    it == the "real JID"

  205. pep.

    hmm

  206. lovetox

    Daniel, i plan to it like that 1. record the timestamp the message arrived at your client 2. look for a trustworthy timestamp (MAM, MUC History, SM) -> this overrides 1 3. look for a user set timestamp -> record it separately

  207. MattJ

    Without using 'it': The spec does not instruct the server to send a real JID in a semi-anonymous room, so I highly doubt you will find text instructing the client not to use one that is present

  208. pep.

    MattJ, tbh I already "break" vcard in non-anon MUCs, with private PEP

  209. pep.

    (and I'm fine with it)

  210. MattJ

    pep., in practice Prosody has been sending real JIDs in semi-anon since... forever, and clients seem fine with it

  211. lovetox

    on display, if the diff of user timestamp to server timestamp is < X, order the messages accordingly

  212. pep.

    MattJ, ??

  213. pep.

    sending realjids in semi-anon?

  214. MattJ

    pep., it always reveals your own JID to yourself, and has done that forever

  215. pep.

    ah

  216. MattJ

    also we send multiple <item> I think?

  217. pep.

    Right but this one is routable, and not of a MUC's occupant-id handling code

  218. MattJ

    So many sneaky protocol violations in this code (which are nice things, but not standard). I never had much to do with MUC :)

  219. pep.

    Why would a client use this @jid btw

  220. pep.

    You know you are you

  221. pep.

    Ah, other resources ?

  222. pep.

    MSN is already not specified anyway, is it

  223. MattJ

    Yes, other resources

  224. MattJ

    MSN was added in brief, at some point

  225. MattJ

    s/added/hacked/

  226. MattJ

    A good hack, nevertheless

  227. Daniel

    clarified

  228. MattJ

    Exactly

  229. Ge0rG

    Daniel [15:10]: > clarified 🤣🤣🤣

  230. Ge0rG

    Can you have a triple Emoji in Reactions?