jdev - 2019-08-09

  1. Zash has left

  2. marc0s has left

  3. marc0s has joined

  4. lovetox has joined

  5. wurstsalat has joined

  6. lovetox

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

  7. lovetox

    i dont fin any

  8. lovetox

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

  9. 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 :)

  10. lovetox

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

  11. moparisthebest has left

  12. Zash has joined

  13. lovetox

    pep. jabber@ is available

  14. rion has left

  15. rion has joined

  16. rion

    that's strange. Neustradamus is still not here.

  17. lovetox


  18. pep.

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

  19. bnyann has joined

  20. 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 ?

  21. pep.


  22. pep.

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

  23. test has joined

  24. bnyann

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

  25. Link Mauve has joined

  26. bnyann

    This is the js code for the applicaiton:

  27. 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; });\

  28. Zash

    Why do you hate mod_pastebin, pep. ? Whyyyyyyy

  29. pep.

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

  30. bnyann

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

  31. 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>

  32. pep.

    Maybe someone else knows strophe. I have never used it

  33. bnyann

    Hi does anyone know how to use Strophe library ?

  34. bnyann

    pep. Which library do you use ?

  35. Kev

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

  36. jcbrand has joined

  37. pep.

    bnyann: something not in javascript

  38. jcbrand

    I have been summoned

  39. Zash

    That BOSH proxy doesn't appear to be online anymore

  40. bnyann

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

  41. Zash

    So, that's probably why

  42. bnyann

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

  43. jcbrand


  44. jcbrand

    No reason why it shouldn't be

  45. jcbrand

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

  46. jcbrand

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

  47. bnyann

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

  48. jcbrand

    Then check whether they have a BOSH endpoint

  49. jc has joined

  50. bnyann

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

  51. jcbrand

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

  52. jcbrand

    You can use that

  53. jcbrand

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

  54. bnyann

    jcbrand Thanks let me try that now

  55. bnyann

    I'm really new to XMPP

  56. MattJ

    Out of curiosity, what brings you to it?

  57. jcbrand


  58. 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

  59. Zash

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

  60. jcbrand

    In other words, trying to take over the world

  61. bnyann

    jcbrand Almost but in no Dr Jekyll kind of way

  62. bnyann

    the homebrewe club seems solid thanks

  63. Zash

    Pinky and the bnyann ? 😃

  64. 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?

  65. 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

  66. bnyann

    I meant XMPP (it)

  67. bnyann

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

  68. 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.

  69. jcbrand

    Disclaimer: I'm the author of Converse.js

  70. jcbrand

    Disclosure: I'm the author of Converse.js

  71. jcbrand


  72. jcbrand

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

  73. bnyann

    jcbrand perfect !

  74. rion

    Does convers support sims?

  75. rion


  76. jcbrand

    rion: no

  77. jc has left

  78. jc has joined

  79. rion

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

  80. jcbrand

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

  81. jcbrand

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

  82. rion

    like oob or sims?

  83. rion

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

  84. jcbrand

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

  85. jcbrand

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

  86. jcbrand

    Converse doesn't support jingle, only http upload

  87. moparisthebest has joined

  88. rion

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

  89. rion

    for some big files http upload usually won't work

  90. lovetox

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

  91. rion

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

  92. lovetox

    name, size, extension, length etc

  93. rion


  94. rion

    that was sims =)

  95. jcbrand

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

  96. rion

    still wip though.

  97. rion

    jcbrand: what to make a client cool?

  98. rion

    jcbrand: why to make a client cool?

  99. jc has left

  100. perflyst has joined

  101. perflyst has left

  102. 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 :)

  103. pep.

    MattJ, ssshhh :P

  104. Daniel has joined

  105. moparisthebest has left

  106. moparisthebest has joined

  107. marc0s has left

  108. marc0s has joined

  109. test has left

  110. jcbrand has left

  111. legastero has joined

  112. legastero has left

  113. Lance has joined

  114. rion

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

  115. rion

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

  116. Test has joined

  117. Lance has left

  118. ZashC has joined

  119. ZashC has left

  120. larma has joined

  121. bnyann has left

  122. Test has left

  123. wurstsalat has left

  124. wurstsalat has joined

  125. wurstsalat has left

  126. wurstsalat has joined

  127. lovetox has left

  128. moparisthebest has left

  129. moparisthebest has joined

  130. moparisthebest has left

  131. moparisthebest has joined

  132. moparisthebest has left

  133. moparisthebest has joined

  134. wurstsalat has left