jdev - 2020-04-21


  1. lovetox

    no

  2. lovetox

    why? so MAM does archive it?

  3. lovetox

    or so clients that dont support direct can display something

  4. Ge0rG

    lovetox: both of those, yeah

  5. Ge0rG

    also for Carbons to work

  6. flow

    appears that including a fallback body should become a pattern (at least in some cases)

  7. Ge0rG

    flow: it's been a pattern for twenty years

  8. Ge0rG

    most MUC implementations send a fallback body in direct invites.

  9. Ge0rG

    it's also mostly very ugly

  10. flow

    then it's not a widely known one and at least not specifies in xep249

  11. flow

    then it's not a widely known one and at least not specified in xep249

  12. flow

    Ge0rG, sending a fallback body with xep249 direct muc invitations is ugly? care to elaborate?

  13. Ge0rG

    flow: feel free to PR, I guess

  14. Ge0rG

    flow: no, the fallback body generated by MUC implementations is ugly

  15. Zash

    The direct invite included in the meditated invite is also fun

  16. Ge0rG

    flow: it would be great to have a small section in 0249 discussing that a) a fallback body MAY be added by the sender and that if it is added, it MUST NOT contain any information that's not in the <x/>, so that it is safe to ignore by compliant implementations

  17. lovetox

    when do i want to send an directed invite instead of a mediated one?

  18. jonas’

    lovetox, when your recipient filters messages from strangers

  19. lovetox

    i cant know that

  20. jonas’

    (since the MUC is going to be a stranger)

  21. jonas’

    exactly

  22. jonas’

    so the answer is "always, unless you have to go mediated because of ACLs"

  23. lovetox

    so it cant be factor in my decision

  24. lovetox

    but mediated invite adds automatically to member list

  25. jonas’

    that’s what I meant

  26. jonas’

    if you are in members-only and you are not an admin, you have to go mediated

  27. jonas’

    if you are in members-only and you are an admin, you add them to the member list and send direct

  28. jonas’

    otherwise, you send direct

  29. lovetox

    omg, way too complicated

  30. jonas’

    yes

  31. lovetox

    somebody should write some flowchart

  32. jonas’

    I just did :)

  33. jonas’

    in text form tho

  34. lovetox

    flowchart in text form i have to remember that :D

  35. flow

    lovetox, "way too compliacted" implies that there is a less complicated way. Please share that :)

  36. lovetox

    i dont see how one implys the other

  37. Zash

    0401 ish flow for MUC?

  38. lovetox

    quantum physic is also way to complicated for me, that does not mean there is an easier way :)

  39. jonas’

    +------------------+ +-----------------+ +-------------------+ | | yes | | no | | | is members-only? +------->+ am admin? +------------->+ send mediated | | | | | | | +--------+---------+ +--------+--------+ +-------------------+ | | | |yes |no v | +--------+--------+ | | | | | add as member | | | | | +--------+--------+ | | | | | v | +--------+--------+ | | | +----------------->+ send directed | | | +-----------------+

  40. jonas’

    https://paste.debian.net/hidden/727768a8/

  41. flow

    oh, now the nice flow chart is gone :(

  42. jonas’

    flow, it was only nice if you have a mono-spaced font

  43. lovetox

    great thanks jonas’

  44. flow

    ahh true :)

  45. jonas’

    lovetox, if you’re smart, you put this somewhere sane ;)

  46. jonas’

    because that paste expires in 7d

  47. flow

    PR that in xep45, otherwise it will be gone forever in 7d?

  48. jonas’

    flow, maybe rather in the XEP for invites?

  49. flow

    or that

  50. jonas’

    https://xmpp.org/extensions/xep-0249.html

  51. flow

    jonas’, I wonder: was that hand crafted or did you use some tool?

  52. jonas’

    asciiflow.com

  53. jonas’

    http://asciiflow.com

  54. jonas’

    flow, note that it has nothing to do with re-encoding you in ASCII, no worries.

  55. flow

    Yes, good, I like my DNA-based encoding

  56. lovetox

    and how to deal with invites received through MAM?

  57. lovetox

    obviously i check if its already in my bookmarks, but what if not?

  58. lovetox

    check the date? and only show if its the near past?

  59. flow

    lovetox, sadly the MAM archive does not contain the information if the user decided to not follow the invitation

  60. Zash

    Joining every room I was ever invited to is a bit annoying, so don't do that maybe

  61. flow

    one could store rejected invitations with a timestamp in a private pep node

  62. lovetox

    yeah wondering how clients deal with that which implement auto join on invite

  63. Martin

    > check the date? and only show if its the near past? Can you create something like a bookmark withe 'do not join, declined' info?

  64. Martin

    > check the date? and only show if its the near past? Can you create something like a bookmark with 'do not join, declined' info?

  65. flow

    Martin, you can

  66. Martin

    Ah, what flow said.

  67. flow

    but someone has to implement it ;)

  68. jonas’

    if only we had a mechanism where the server tracks inbound requests and ack/naks for those

  69. lovetox

    but i can decline a invite, why would it not be stored in mam?

  70. lovetox

    its a message

  71. flow

    there is not really a nack for rejected invitations?

  72. Zash

    ``` $ graph-easy --as=ascii <<. graph "test" { foo -> { bar boo } -> baz } . +-----+ +-----+ | boo | <-- | foo | +-----+ +-----+ | | | | | v | +-----+ | | bar | | +-----+ | | | | | v | +-----+ +-------> | baz | +-----+ ```

  73. jonas’

    in groupchat 1.0, (mediated) invites could’ve been presence subscription requests which are indeed tracked by the server. Doesn’t solve it for the non-insane post-GC-1.0 world, nor for mediated invites, but it still crossed my mind.

  74. Zash

    Pretty sure there's a way to reject invites

  75. Zash

    https://xmpp.org/extensions/xep-0045.html#example-59

  76. flow

    Nice, so problem solves?

  77. flow

    Nice, so problem solved?

  78. jonas’

    not for '249 though?

  79. Zash

    Could also keep bookmarks around for some with autojoin=false after you left

  80. Zash

    Maybe invent a bookmarks2 'trash' flag?

  81. flow

    can't xep239 simply re-use xep45 decline (even though it currently states to silently discard)

  82. flow

    can't xep249 simply re-use xep45 decline (even though it currently states to silently discard)

  83. Zash

    What if you accept, but later leave?

  84. flow

    Zash, dunno, using muc bookmarks for mucs you are not really interested in seems not right

  85. Zash

    And then a fresh client syncs MAM, sees the invite and joins the room that you wanted nothing to do with anymore.

  86. flow

    meh

  87. Zash

    Needs more flowcharts!

  88. Ge0rG

    you *could* reject an invite, but why should you?

  89. Zash

    invited -> rejected -> ensure rejection is saved somewhere invited -> accepted -> bookmarked -> leave -> ???

  90. Ge0rG

    autojoin=1 -> yes, autojoin=0 -> keep in mind but don't join, autojoin=-1 -> blacklisted!

  91. Zash

    but it's a boolean

  92. Ge0rG

    autojoin=0 -> keep in mind but don't join, autojoin=n -> blacklisted!

  93. Ge0rG

    won't prosody keep the actual textual representation in the store?

  94. Zash

    Other clients parsing and re-serializing it tho?

  95. Ge0rG

    Zash: who cares about other clients?

  96. Ge0rG

    oh wait, you can just block the room JID and manually compare direct invites to the blocklist

  97. Zash

    Heh, hacky but I suppose it would work

  98. Zash

    And it would prevent unknowing clients from joining

  99. Ge0rG

    lovetox: there is one more reason for direct invites: you might want to auto-join invites to private rooms from a contact, because insta-chats. And you can't ensure that a mediated invite really came from a contact and not from a malicious MUC

  100. flow

    Zash> And it would prevent unknowing clients from joining hopefully with a nice error message instead of a silent timeout

  101. flow

    i'm also not sure about the UX if the user afterwards decides that to join the room

  102. Zash

    Blocking command mandates an error iirc

  103. Zash

    Hm

  104. flow

    what would be the 'from' value of the iq error?

  105. Zash

    > If the user attempts to send an outbound stanza to the JID, the user's server MUST NOT route the stanza to the JID but instead MUST return a <not-acceptable/> error [...] https://xmpp.org/extensions/xep-0191.html#block https://xmpp.org/extensions/xep-0191.html#example-9

  106. Zash

    flow, /error/@by is what you mean

  107. Zash

    @to & @from are always swapped for replies

  108. flow

    ahh good then

  109. Zash

    Not sure we set that tho, better check

  110. Zash

    It's not in the example, so probably not :)

  111. Zash

    Heh, indeed

  112. pep.

    > Zash> but it's a boolean or why one shouldn't represent booleans as integers :(

  113. Ge0rG

    pep.: as we all know, the correct represntation for booleans is ["YES", "Norway"]

  114. pep.

    :D

  115. jonas’

    I’ll just leave this here: $ host omdathetkan.monshouwer.org omdathetkan.monshouwer.org is an alias for https://omdathetkan.monshouwer.org. https://omdathetkan.monshouwer.org has address 195.191.112.29 https://omdathetkan.monshouwer.org has IPv6 address 2a02:990:100:1:0:d05::

  116. jonas’

    (re that discussion the other day about nameprep being not strict enough)

  117. flow

    jonas’, hmm, I am not sure if (other) non-LDH labels should appear on the wire

  118. jonas’

    non-LDH?

  119. flow

    ldh: letters digist hypen

  120. flow

    ldh: letters digits hypen

  121. flow

    ldh: letters digits hyphen

  122. flow

    it was my understanding that essentially only those are allowed in the wire protocol

  123. jonas’

    what about _xmpp-server

  124. jonas’

    there was a fun discussion in #powerdns on OFTC a few minutes back (after I asked if '&' (U+0026) is valid in DNS labels) and DNS isn’t actually strict about that

  125. flow

    those are underscore labels

  126. flow

    dns is like 1000s of RFCs, so its kind of complicated

  127. flow

    plus registries are lax when it comes to compliance

  128. flow

    which kinda forces implementations to become a little bit lax too

  129. jonas’

    compliance to what even

  130. flow

    the RFCs i'd assume

  131. flow

    hmm it was pretty sure the kind of labels which are allowed on the wire is specified somewhere

  132. jonas’

    flow, maybe you meant: https://tools.ietf.org/html/rfc1035 <label> ::= <letter> [ [ <ldh-str> ] <let-dig> ] <ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str> <let-dig-hyp> ::= <let-dig> | "-" <let-dig> ::= <letter> | <digit> <letter> ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case <digit> ::= any one of the ten digits 0 through 9

  133. jonas’

    but that seems to be generally understood more as "guideline" than as "rule" by the DNS community

  134. flow

    yes and no, that's one of the very first of DNS related RFCs

  135. flow

    there are many updates to this

  136. jonas’

    idneed

  137. jonas’

    indeed

  138. jonas’

    but if the powerdns folks tell me that, I’m not going to argue ;)

  139. jonas’

    I don’t want to be *that* person who tries to point at RFCs in a field they don’t know about in front of the folks implementing them all day ;)

  140. flow

    jonas’, they tell you it is valid?

  141. jonas’

    yes

  142. flow

    could very well be, as I said i'm not sure

  143. jonas’

    I hear that there are not really restrictions

  144. jonas’

    there’s something for "hostnames", but that’s irrespective of DNS

  145. jonas’

    as you can see, the https:// stuff passing right through

  146. jonas’

    powerdns will reject & and ; with the SQL backend tho

  147. flow

    and '://' is not really the intersting part of the ASCII range

  148. jonas’

    so no fun to be had with &quot;.domain.example and XML

  149. flow

    and '://' is not really the interesting part of the ASCII range

  150. Zash

    Ge0rG, you might enjoy `dig 🤖️.zash.se txt +noidnin`

  151. jonas’

    I get NXDOMAIN

  152. jonas’

    but that may be copy/paste issues

  153. Zash

    `dig txt bender.zash.se` but it gets escaped :(

  154. flow

    ahh, possible that https://tools.ietf.org/html/rfc2181#section-11 is still in effect

  155. flow

    which means binary fun

  156. flow

    still LDH label is what you usually want to see on the wire, and underscore labels of course

  157. flow

    https://tools.ietf.org/html/rfc5890#section-2.3.1 has a nice overview

  158. jonas’

    "want" :>

  159. jonas’

    again, I’m not going to dig into that now

  160. flow

    @ c query ("🤖.zash.se", org.minidns.record.Record.TYPE.TXT) java.lang.IllegalArgumentException: java.text.ParseException: An unassigned code point was found in the input 🤖

  161. Zash

    eheehehehhee

  162. jonas’

    bedtime

  163. flow

    hmm, which is kinda strange, as the robot was added in unicode 8 and this is java 11 which should support unicode 10

  164. flow

    or do I have that shell switched to an older JRE…

  165. flow

    but bedtime sounds good :)