jdev - 2019-08-09


  1. lovetox

    is there a reference somewhere except the wiki on xmpp.org to jdev@conference.jabber.org?

  2. lovetox

    i dont fin any

  3. lovetox

    MattJ, you could update your wiki page https://wiki.xmpp.org/web/User:MattJ

  4. pep.

    hmm, maybe we should also update that other room, jabber@. I can imagine the fun as a user being recommended to go on that room to solve their issue and they can't connect to it :)

  5. lovetox

    i updated the jdev address on the wiki, and on wikipedia

  6. lovetox

    pep. jabber@ is available

  7. rion

    that's strange. Neustradamus is still not here.

  8. lovetox

    :D

  9. pep.

    If he missed it that probably means xsf@ is not a good venue for advertising

  10. bnyann

    Hi I'm trying to build the XMPP Hello app in Moffit's book chapter 3. But I keep getting the response "server disconnected" Never that a connection was established. Can you please diagnose this ?

  11. pep.

    !

  12. pep.

    Do you have code to show? I tried to find the book but didn't find the example

  13. bnyann

    sure. I can post it here or on stackoverflow for easy viewing

  14. bnyann

    This is the js code for the applicaiton:

  15. bnyann

    let Hello ={ connection: null, start_time: null, log: function(msg){ $("#log").append("<p>"+ msg +"</p>"); }, send_ping: function(to){ let ping = $iq({ to: to, type:"get", id:"ping1"}).c("ping", {xmlns:"urn:xmpp:ping"}); Hello.log("Sending ping to:"+to+"."); Hello.start_time = (new Date()).getTime(); Hello.connection.send(ping); }, handle_pong: function(iq){ let elapsed =(new Date()).getTime() - Hello.start_time; Hello.log("Received pong from server in : "+ elapsed+" ms"); Hello.connection.disconnect(); return false; } }; $(document).ready(function(){ $("#login_dialog").dialog({ autoOpen: true, draggable: false, modal: true, title:"Connect to XMPP", buttons:{ "Connect": function(){ $(document).trigger("connect",{ jid: $("#jid").val(), password: $("#password").val() }); $("#password").val(""); $(this).dialog('close'); } } }); }); $(document).bind('connect', function(ev, data){ let conn = new Strophe.Connection("http://bosh.metajack.im:5280/xmpp-httpbind"); console.log(conn); conn.connect(data.jid, data.password, function(status){ if (status === Strophe.Status.CONNECTED){ $(document).trigger('connected'); }else if (status === Strophe.Status.DISCONNECTED){ $(document).trigger('disconnected'); } }); Hello.connection = conn; }); $(document).bind('connected', function(){ // inform the user Hello.log("Connection established"); Hello.connection.addHandler(Hello.handle_pong, null, "iq", null, "ping1"); let domain = Strophe.getDomainFromJid(Hello.connection.jid); Hello.send_ping(domain); }); $(document).bind('disconnected', function(){ Hello.log("Connection terminated..."); //remove the connection object Hello.connection = null; });\

  16. Zash

    Why do you hate mod_pastebin, pep. ? Whyyyyyyy

  17. pep.

    No, I hate that it's not configurable per user :P

  18. bnyann

    pep. I posted the js for the code above. Here's the html for UI:

  19. bnyann

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Hello - Chapter 3</title> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/cupertino/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script> <script src="scripts/strophe.js"></script> <script src="scripts/flXHR.js"></script> <script src="scripts/strophe.flxhr.js"></script> <link rel="stylesheet" href="hello.css"> <script src="hello.js"></script> </head> <body> <h1>Hello</h1> <div id="log"> </div> <!-- login dialog --> <div id="login_dialog" class="hidden"> <label>JID:</label><br/><input type="text" id="jid"> <label>Password:</label><br/><input type="password" id="password"> </div> </body> </html>

  20. pep.

    Maybe someone else knows strophe. I have never used it

  21. bnyann

    Hi does anyone know how to use Strophe library ?

  22. bnyann

    pep. Which library do you use ?

  23. Kev

    Looks like jcbrand is maintaining strophe now, at least glancing at the commit log. Shame he's not in here.

  24. pep.

    bnyann: something not in javascript

  25. jcbrand

    I have been summoned

  26. Zash

    That BOSH proxy doesn't appear to be online anymore

  27. bnyann

    pep. and Kev jcbrand Why do you the code is skipping connection straight to disconnect ?

  28. Zash

    So, that's probably why

  29. bnyann

    Zash So even though the proxy is unavailable, the Strophe object was still instantiated ?

  30. jcbrand

    Yes

  31. jcbrand

    No reason why it shouldn't be

  32. jcbrand

    bnyann: Do you host your own XMPP server? If so you can set up your own BOSH endpoint

  33. jcbrand

    You really should, the BOSH connection manager can log your username and password if you log in with PLAIN

  34. bnyann

    nope ! I registered mine here: https://www.xmpp.jp/signup?lang=en. witht the JID bnyann@xmpp.jp

  35. jcbrand

    Then check whether they have a BOSH endpoint

  36. bnyann

    jcbrand Can you please point me to any learning resources on how to host my own XMPP server to resolve this ?

  37. jcbrand

    Looks like their BOSH endpoint is this: https://www.xmpp.jp/http-bind

  38. jcbrand

    You can use that

  39. jcbrand

    Concerning learning resources: https://homebrewserver.club/configuring-a-modern-xmpp-server.html

  40. bnyann

    jcbrand Thanks let me try that now

  41. bnyann

    I'm really new to XMPP

  42. MattJ

    Out of curiosity, what brings you to it?

  43. jcbrand

    LOL

  44. bnyann

    MattJ Learning mostly. I've got a neuroscience background and it appears more to me every day that future tech will heavily leverage human systems (basal human behaviors) XMPP seems to be exciting in how easily they implement some of these things

  45. Zash

    Relatedly, one day I'd like to try using Stanza.js for something

  46. jcbrand

    In other words, trying to take over the world

  47. bnyann

    jcbrand Almost but in no Dr Jekyll kind of way

  48. bnyann

    the homebrewe club seems solid thanks

  49. Zash

    Pinky and the bnyann ? 😃

  50. jcbrand

    Joking aside, it's actually quite interesting. What do you mean "how easily they implement some of these things"? Who's they? And what things?

  51. bnyann

    I was reading Moffit's book. seems previous solutions are possible, but require a ton of legwork. My bad have not my morning coffee yet

  52. bnyann

    I meant XMPP (it)

  53. bnyann

    jcbrand I replaced the BOSH endpoint in my original code with https://www.xmpp.jp/http-bind, the code still prints connection terminated

  54. jcbrand

    bnyann: You might want to take a look at Converse.js, it uses Strophe and does some of the legwork for you. You can build your own UI on top of it if you want to and it has a plugin system.

  55. jcbrand

    Disclaimer: I'm the author of Converse.js

  56. jcbrand

    Disclosure: I'm the author of Converse.js

  57. jcbrand

    https://conversejs.org/https://conversejs.org/

  58. jcbrand

    Depends on what you want to do... but Strophe is quite low-level

  59. bnyann

    jcbrand perfect !

  60. rion

    Does convers support sims?

  61. rion

    Converse.js*

  62. jcbrand

    rion: no

  63. rion

    jcbrand: no one will be able to receive my voice messages :(

  64. jcbrand

    I actually would like to add support for voice messages, our family uses them a lot, but I use Conversations for thta

  65. jcbrand

    I actually would like to add support for voice messages, our family uses them a lot, but I use Conversations for that

  66. rion

    like oob or sims?

  67. rion

    sims has a benefit as a fallback to jingle if oob is not available for some reason

  68. jcbrand

    I'm not sure what the point of SIMS is, I would just record an audio file and use http upload with oob

  69. jcbrand

    I'm not sure what the point of SIMS is, I would just record an audio file and use http upload

  70. jcbrand

    Converse doesn't support jingle, only http upload

  71. rion

    jcbrand: for voice yes but only of http upload service is provided by your server

  72. rion

    for some big files http upload usually won't work

  73. lovetox

    jcbrand, the point would be to send metadata with the file

  74. rion

    in my case (in Psi) I also add volume histogram to metadata in SIMS. And it looks pretty natural.

  75. lovetox

    name, size, extension, length etc

  76. rion

    https://jabber.ru/upload/98354d3264f6584ef9520cc98641462d6906288f/tvqKJbCs7oKuvyqPu5DA8tvZviddR1scnUtzqxlN/psishare-at7672.png

  77. rion

    that was sims =)

  78. jcbrand

    > I also add volume histogram to metadata in SIMS. And it looks pretty natural. Kinda cool, but why? 🙂

  79. rion

    still wip though.

  80. rion

    jcbrand: what to make a client cool?

  81. rion

    jcbrand: why to make a client cool?

  82. MattJ

    Seems a sane thing to do, from a coolness perspective. However I wonder how many people would actually notice if it was just randomized :)

  83. pep.

    MattJ, ssshhh :P

  84. rion

    But there are no regular people on xmpp. All not the geeks use telegram/whatsapp/etc

  85. rion

    And then Neustardemus will come and say your client is not "perfect" because the data is not real)