jdev - 2020-06-28


  1. daidoji

    Hi, I'm trying to play around with modifying ejabberd with new xmpp commands with more functionality and I was wondering what the "easiest" client would be to use to do that? I've tried using conversejs and strophe directly but are there any other options?

  2. daidoji

    Like say I wanted to display mod_time on a website.

  3. daidoji

    https://github.com/processone/ejabberd/blob/master/src/mod_time.erl

  4. Zash

    Probably depends mostly on what (languages etc) you're most familiar with already.

  5. daidoji

    hmm, I'm a data scientist by trade. I thought these javascript clients would be easiest since I've done work in that language and haven't done much Gui work

  6. daidoji

    to be honest, I'd just be happy with a client that had some walkthroughs instead of slogging through the mud on my own

  7. daidoji

    like I just wondered what other people do? Are there like XMPP tools I don't know about or utilities to make this easier? Or do people just adjust their servers/clients and then fire up wireshark or something?

  8. Zash

    It depends. Personally I'm pretty likely to try to solve whatever by writing Prosody modules or whatever in Lua, since that's what I'm most familiar with.

  9. daidoji

    word

  10. Zash

    As for JS and Strophe.js, I still have this book on a shelf somewhere: http://professionalxmpp.com/

  11. daidoji

    yeah I saw that. Did you think it was good?

  12. Zash

    I think so. Was some time ago I read it last tho.

  13. daidoji

    word, well I'll order it and see then.

  14. Zash

    Hm, https://strophe.im/strophejs/#documentation--tutorials looks like a short list

  15. daidoji

    yeah I saw those

  16. daidoji

    but they were a bit opaque :p

  17. daidoji

    at least for my skillset. However, I'll dive back into those for now I guess

  18. daidoji

    I'm just at the don't know what I don't know part of my journey here with XMPP

  19. Zash

    And it looks like the links have broken :(

  20. daidoji

    some of them, they're still in the github repo

  21. daidoji

    another weird thing about that project is I had to fiddle with the makefile to get it to build

  22. daidoji

    they rely on naturaldocs which is some kind of .Net tool for doing documentation

  23. daidoji

    Wasn't a quick way to get it working on linux

  24. Zash

    Nothing I've heard about

  25. lovetox

    daidoji, am i understanding you correctly, you want for example to modify the server moudle mod_time

  26. lovetox

    and just need a client to test your modifications?

  27. Matt

    hello anyone online?

  28. Martin

    Yep

  29. Matt

    i have a question about strophe lol

  30. Matt

    someone is already mentioned it above

  31. Matt

    im trying to connect to an xmpp server using strophe and i get the xml out put and strophe shows that my user name is password is correct but for some reason its not connecting.

  32. Martin

    No idea about strophe but maybe someone else knows it.

  33. Matt

    same thing with xmpp.js

  34. lksjdflksjdf

    Is there a server that has code for XEP-0436 (MUC presence versioning) yet? I couldn't find anything but perhaps there's branch or module I overlooked

  35. flow

    lksjdflksjdf, given that it's co-authored by matthew, I'd look into the prosody trunk

  36. daidoji

    lovetox well I wanted to add some capabilities to a muc room

  37. daidoji

    and I thought hte best way to do that is add some IQ stanzas and some other things

  38. daidoji

    but then I need to modify the client on one side and the server on the other and there aren't really good tutorials or walkthroughs on how to do that

  39. Zash

    daidoji: Have you gotten enough of strophe.js working to send an iq stanza?

  40. Zash

    Once connected, it'd be something like: `connection.sendIQ($iq({type:"get",id:connection.getUniqueId()}).c("time",{xmlns:"urn:xmpp:time"}), (r) => console.log(new Date(r.firstChild.getElementsByTagName("utc")[0].textContent)))`

  41. Zash

    In Prosody, that's responded to by https://hg.prosody.im/trunk/file/tip/plugins/mod_time.lua

  42. MattJ

    lksjdflksjdf: in not aware of any implementation yet

  43. lksjdflksjdf

    ok thanks for the info

  44. lksjdflksjdf

    I'm wondering something about the XEP though ... A user goes offline and online again - are we back to the same version? What if the user switches clients, is that still the same version?

  45. daidoji

    Zash yeah I figured that out just last night after I got off

  46. lovetox

    Gajim has a XML Console

  47. lovetox

    where you can simply put in the xml you want, and it sends it for you

  48. lovetox

    also you can see what you get back from the server, if thats what you want

  49. daidoji

    lovetox oh wow that's awesome. Thanks

  50. MattJ

    lksjdflksjdf: it could be the same version if the state of the room is exactly the same

  51. MattJ

    That's all the XEP needs to specify

  52. Zash

    Same could apply to roster versioning

  53. MattJ

    Yes

  54. lksjdflksjdf

    I understand that you want to leave the details up to implementations πŸ€”οΈ I'm just more interested in the details of muc versioning (implementations) than the details of roster versioning, because there tend to be much more changes there. Like, if I leave a 300-person MUC at night and rejoin it the morning after. If 280 of those 300 people are the same and I only get 20 presences, that'd be nice. But if I still get 300 presences because everyone rejoined or is online with different resources, I'm not too excited about the feature anymore.

  55. moparisthebest

    lksjdflksjdf, if a person named 'bob' is there right now and tommorow you don't even know if it's the same person or not

  56. MattJ

    lksjdflksjdf: if you rejoin 8 hours later I don't think it's terrible if you have to refetch

  57. lksjdflksjdf

    moparisthebest, you mean if it _wasn't_ a different version after bob rejoined, I wouldn't know if it's the same person? Technically you could, with occupant ids. But without occupant ids that's true.

  58. Zash

    While there'll be more stuff going on with presence, it's probably still worth it to look at roster versioning and how that's implemented, since it's basically the same model.

  59. Zash

    You have stuff, that may change, and you have some token that identifies a specific version of it. You show the server the token and you get something that's supposed to sync your state with the servers.

  60. lksjdflksjdf

    > if you rejoin 8 hours later I don't think it's terrible if you have to refetch aw πŸ™ but it takes time and bandwidth. Sure it's not "terrible" but I was hoping it could be partially eliminated

  61. MattJ

    I'm not saying it can't

  62. MattJ

    But I think that's stretching the goals

  63. Zash

    With roster versioning, if sending the delta would be larger than just sending the roster ... then just send the roster!

  64. Zash

    Or if you don't have enough deltas. Or if you don't actually keep deltas at all, in which case it's just a ETag-ish thing.

  65. testhello

    hi guys it's my first time using xmpp

  66. testhello

    say something if it's working

  67. lksjdflksjdf

    Zash, what's an "ETag"?

  68. Zash

    testhello, "something"

  69. lksjdflksjdf

    testhello, it's working πŸ˜‰

  70. testhello

    woah

  71. Zash

    lksjdflksjdf, HTTP cache thing.

  72. testhello

    dude this is like the original QQ or wechat

  73. lksjdflksjdf

    you mean your client looks like it was from 15 years ago? πŸ˜›

  74. Zash

    One of the nice things is that if you don't like the client, there are others you can use.

  75. testhello

    I head Tencent originally ripped off of something I guess this is the one huh...

  76. lovetox

    jonas’, was there any progress on the avatar from muclumbus front?