-
lovetox
is there a reference somewhere except the wiki on xmpp.org to jdev@conference.jabber.org?
-
lovetox
i dont fin any
-
lovetox
MattJ, you could update your wiki page https://wiki.xmpp.org/web/User:MattJ
-
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 :)
-
lovetox
i updated the jdev address on the wiki, and on wikipedia
-
lovetox
pep. jabber@ is available
-
rion
that's strange. Neustradamus is still not here.
-
lovetox
:D
-
pep.
If he missed it that probably means xsf@ is not a good venue for advertising
-
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 ?
-
pep.
!
-
pep.
Do you have code to show? I tried to find the book but didn't find the example
-
bnyann
sure. I can post it here or on stackoverflow for easy viewing
-
bnyann
This is the js code for the applicaiton:
-
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; });\
-
Zash
Why do you hate mod_pastebin, pep. ? Whyyyyyyy
-
pep.
No, I hate that it's not configurable per user :P
-
bnyann
pep. I posted the js for the code above. Here's the html for UI:
-
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>
-
pep.
Maybe someone else knows strophe. I have never used it
-
bnyann
Hi does anyone know how to use Strophe library ?
-
bnyann
pep. Which library do you use ?
-
Kev
Looks like jcbrand is maintaining strophe now, at least glancing at the commit log. Shame he's not in here.
-
pep.
bnyann: something not in javascript
-
jcbrand
I have been summoned
-
Zash
That BOSH proxy doesn't appear to be online anymore
-
bnyann
pep. and Kev jcbrand Why do you the code is skipping connection straight to disconnect ?
-
Zash
So, that's probably why
-
bnyann
Zash So even though the proxy is unavailable, the Strophe object was still instantiated ?
-
jcbrand
Yes
-
jcbrand
No reason why it shouldn't be
-
jcbrand
bnyann: Do you host your own XMPP server? If so you can set up your own BOSH endpoint
-
jcbrand
You really should, the BOSH connection manager can log your username and password if you log in with PLAIN
-
bnyann
nope ! I registered mine here: https://www.xmpp.jp/signup?lang=en. witht the JID bnyann@xmpp.jp
-
jcbrand
Then check whether they have a BOSH endpoint
-
bnyann
jcbrand Can you please point me to any learning resources on how to host my own XMPP server to resolve this ?
-
jcbrand
Looks like their BOSH endpoint is this: https://www.xmpp.jp/http-bind
-
jcbrand
You can use that
-
jcbrand
Concerning learning resources: https://homebrewserver.club/configuring-a-modern-xmpp-server.html
-
bnyann
jcbrand Thanks let me try that now
-
bnyann
I'm really new to XMPP
-
MattJ
Out of curiosity, what brings you to it?
-
jcbrand
LOL
-
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
-
Zash
Relatedly, one day I'd like to try using Stanza.js for something
-
jcbrand
In other words, trying to take over the world
-
bnyann
jcbrand Almost but in no Dr Jekyll kind of way
-
bnyann
the homebrewe club seems solid thanks
-
Zash
Pinky and the bnyann ? 😃
-
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?
-
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
-
bnyann
I meant XMPP (it)
-
bnyann
jcbrand I replaced the BOSH endpoint in my original code with https://www.xmpp.jp/http-bind, the code still prints connection terminated
-
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.
-
jcbrand
Disclaimer: I'm the author of Converse.js✎ -
jcbrand
Disclosure: I'm the author of Converse.js ✏
-
jcbrand
https://conversejs.org/https://conversejs.org/
-
jcbrand
Depends on what you want to do... but Strophe is quite low-level
-
bnyann
jcbrand perfect !
-
rion
Does convers support sims?
-
rion
Converse.js*
-
jcbrand
rion: no
-
rion
jcbrand: no one will be able to receive my voice messages :(
-
jcbrand
I actually would like to add support for voice messages, our family uses them a lot, but I use Conversations for thta✎ -
jcbrand
I actually would like to add support for voice messages, our family uses them a lot, but I use Conversations for that ✏
-
rion
like oob or sims?
-
rion
sims has a benefit as a fallback to jingle if oob is not available for some reason
-
jcbrand
I'm not sure what the point of SIMS is, I would just record an audio file and use http upload with oob✎ -
jcbrand
I'm not sure what the point of SIMS is, I would just record an audio file and use http upload ✏
-
jcbrand
Converse doesn't support jingle, only http upload
-
rion
jcbrand: for voice yes but only of http upload service is provided by your server
-
rion
for some big files http upload usually won't work
-
lovetox
jcbrand, the point would be to send metadata with the file
-
rion
in my case (in Psi) I also add volume histogram to metadata in SIMS. And it looks pretty natural.
-
lovetox
name, size, extension, length etc
-
rion
https://jabber.ru/upload/98354d3264f6584ef9520cc98641462d6906288f/tvqKJbCs7oKuvyqPu5DA8tvZviddR1scnUtzqxlN/psishare-at7672.png
-
rion
that was sims =)
-
jcbrand
> I also add volume histogram to metadata in SIMS. And it looks pretty natural. Kinda cool, but why? 🙂
-
rion
still wip though.
-
rion
jcbrand: what to make a client cool?✎ -
rion
jcbrand: why to make a client cool? ✏
-
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 :)
-
pep.
MattJ, ssshhh :P
-
rion
But there are no regular people on xmpp. All not the geeks use telegram/whatsapp/etc
-
rion
And then Neustardemus will come and say your client is not "perfect" because the data is not real)