XSF Discussion - 2020-04-26

  1. MattJ

    The Github folk have detached xsf/memberbot from Link Mauve's repo

  2. jonas’


  3. Link Mauve

    Great, now I can delete my repo!

  4. marc

    Can somebody recommend a XMPP library for low level testing?

  5. marc

    preferably Python

  6. marc

    aioxmpp seems quite high-level

  7. jonas’

    marc, what kind of low-level testing?

  8. marc

    jonas’, sending packets (not IQ) before authentication

  9. lovetox

    you mean a xmpp lib you can hack to do that

  10. lovetox

    or one that provides a API for send_packet_before_auth()

  11. pep.

    or something with send_raw()

  12. marc

    lovetox, yeah, something like send_raw()

  13. marc

    especially I don't want to authenticate

  14. pep.

    There's probably an escape hatch like that on every library around, I'd hope

  15. lovetox

    you would still need a lib that lets you use this at that special moment

  16. jonas’

    marc, maybe look into how IBR is implemented in aioxmpp

  17. pep.

    Even if it encourages you not to use it

  18. jonas’

    https://github.com/horazont/aioxmpp/blob/devel/aioxmpp/ibr/service.py#L65 https://github.com/horazont/aioxmpp/blob/devel/examples/register.py#L34-L40

  19. lovetox

    oh thats a good idea

  20. jonas’

    aioxmpp.IQ isn’t special in that way, you can send any XSO really at that point

  21. MattJ

    lovetox: I've sent you a few messages over the past week, did you receive them?

  22. jonas’

    lovetox, while I’ve got you here, is there a way to turn off autojoining MUCs for (only) one account in gajim?

  23. lovetox

    not as setting no, you would have to add a line to the code

  24. jonas’


  25. jonas’

    I like how my pidgin doesn’t understand bookmarks ;D

  26. lovetox

    MattJ, yes received it i answerd you

  27. lovetox

    MattJ, yes received it i answerd you, just now

  28. MattJ

    Ah, thanks!

  29. lovetox

    jonas’, why you need that?

  30. jonas’

    lovetox, I am used to poezio for MUCs, but I’d like to use something else for 1:1

  31. pep.

    jonas’, anything in particular that we could use as feedback for poezio?

  32. jonas’

    so I want gajim to *not* join all my MUCs; but only on that account, because my other accounts are (obviously) not in poezio, and I want to be able in those MUCs

  33. jonas’

    pep., no, that’s not going to be solvable

  34. jonas’

    it’s just me trying to keep the number of windows in poezio sane

  35. lovetox

    pep., dont steal my users

  36. pep.

    lovetox, you're stealing mine

  37. lovetox

    you had your chance

  38. pep.

    I'll get my revenge

  39. jonas’

    you’d co-exist, just like poezio and pidgin co-exist on my desktop now, so don’t fight please

  40. jonas’


  41. pep.


  42. pep.

    lovetox, I'll let you off for now

  43. lovetox


  44. lovetox

    jonas’, i can only offer you to point you to the line in the code where you could add the line that it skips one special account

  45. jonas’

    lovetox, I’m afraid dpkg won’t be happy about that in the long term

  46. lovetox

    marc, what do you understand under send_raw()

  47. lovetox

    you want to send bytes?

  48. pep.

    lovetox, iirc his XEP uses some before-bind-iq-like stuff

  49. marc

    lovetox, no, xml elements

  50. pep.

    like iq but not in jabber:foo

  51. lovetox

    yeah you can do that with nbxmpp, thanks to the hint form jonas’

  52. lovetox

    if you use nbxmpp in the REGISTER mode

  53. lovetox

    it will connect to the server and give you control before auth

  54. marc

    jonas’, mentioned aioxmpp, no?

  55. lovetox

    as there is no auth in register mode

  56. lovetox

    yeah im sure you can do the same with aioxmpp

  57. lovetox

    just wanted to tell you, that you also can do with nbxmpp

  58. lovetox

    but maybe try first with aioxmpp, its probably way better documented

  59. marc

    there are too many xmpp libraries for python :)

  60. marc

    jonas’, is there a way to send basic xml elements? something like Element(name = '', attrs = ...)

  61. marc

    I don't get the idea behind XSO :)

  62. jonas’

    marc, XSO is just a way to write down a skeleton for XML elements

  63. jonas’

    https://github.com/horazont/aioxmpp/blob/devel/aioxmpp/ping/xso.py#L31-L38 that’s an example which simply defines the XML element <ping xmlns="urn:xmpp:ping"/>; it doesn’t have text or children

  64. jonas’

    if you’ve ever used something like Storm or SQLAlchemy, the ideas behind XSO are very similar

  65. marc

    Okay, got it, thanks!

  66. jonas’

    marc, aioxmpp/version/xso.py would be the next-more-complex example of an XSO

  67. marc

    jonas’, there is no simpler way to generate xml elements, no?

  68. jonas’

    marc, it’s the simplest way ever

  69. jonas’


  70. jonas’

    no, you need to go through XSO. the only other way is to write SAX events yourself.

  71. jonas’

    XSOs are directly converted to SAX events, there is no DOM constructed at any point

  72. jonas’

    (though if you’re into writing SAX events, you can do that, I suppose; you just need to go into the guts of the XMLStream itself)

  73. lovetox

    but actually jonas’ i have that ignore autojoin flag on my todo list

  74. pep.

    > where ``namespace_uri`` may be :data:`None`. Interesting that you're not enforcing namespaces in TAGs

  75. jonas’

    pep., it’ll fail during serialisation in most cases of an xml stream

  76. jonas’

    as soon as the default namespace has been declared, you can’t serialise elements without namespace URI anymore. which is right at the stream header in XMPP XML streams.

  77. marc

    jonas’, can I access xso attrs by simply using the XSO class member variables?

  78. marc

    I want to sent the attr but when I send the packet it hangs

  79. marc

    it works without attrs

  80. marc

    ah, and can I enable a traffic console that shows me the xml traffic sent / received?

  81. marc

    jonas’, ah, already found it!