-
Pradeep
Hi, I am using XMPP for intranet push notifications on mobile phones. Now I have a requirement to do intranet push notifications using XMPP on a web browser. When it comes to browser push notification, it is necessary to write client side inside "Service Worker". To keep it simple. Though my web application is not running in a browser instance, the browser should get notifications from ejabberd server and show a notification to the user.
-
Pradeep
Kindly let me know possible solutions.
-
jonas’
sorry, I don’t know web, but someone else might
-
jonas’
stick around for a while
-
Pradeep
Sure. Thanks.
-
pep.
Pradeep, I assume you're familiar with https://w3c.github.io/push-api/ https://developer.mozilla.org/en-US/docs/Web/API/Push_API
-
pep.
You can still use that in combination with https://xmpp.org/extensions/xep-0357.html
-
pep.
I know some have done it, though I wished it was documented
-
pep.
Also, "intranet"?
-
pep.
Unless you recompile your browsers to change the push API implementation (change the push server's url), I am not entirely sure how that works. Maybe it's configurable..
-
Pradeep
It looks like browser Push_API supports push services like FCM.
-
jonas’
you’re comfortable with sending intranet push notifications through google?
-
Pradeep
We cannot do intranet messaging via FCM. It has to go through cloud.
-
Pradeep
My scenarios is to support devices those are forced to not to be connected to internet.
-
Pradeep
To make it short. The network the devices(desktop, mobile phones) connected is highly secured so that there will be no network connections.
-
jonas’
Pradeep, but how will they then receive messages from FCM?
-
Pradeep
We should not use FCM
-
Pradeep
I am looking for a solution without thirdparty push services. Instead use XMPP for web push notification.
-
Pradeep
I have already achieved in web using Stophe.js on the web page. But the requirement is to establish XMPP connection in background browser service "Service Worker". Mine works only if I keep the web page alive on the browser.
-
jonas’
I see; not sure if that’s even possible. I don’t know much about web things, and I avoid them if possible :)
-
pep.
Pradeep, the web push API doesn't use FCM. It uses the browser's vendor (Mozilla, Google, etc.)
-
Pradeep
Ok, pep. But I don't see an option where we can define our own push service url. That's why I got bit confused.
-
pep.
Hence me saying you might need to recompile the browsers with your own push server url
-
pep.
XMPP can't control that part
-
Zash
about:config in Firefox has some dom.push.serverURL setting that looks relevant
-
Zash
set to some wss URL
-
Zash
No idea what it does tho
-
pep.
Zash, XMPP over Websockets!
-
Pradeep
Let me try the ways you guy suggested. Thanks pep. jonas’ & Zash
-
Pradeep
*guys
-
pep.
Try to get web push working already. I guess you can have fun reverse engineering the push server implementation later..
-
pep.
implementations*
-
jonas’
pep., clean-room reverse engineer? :>
-
jonas’
(I’m sorry)
-
pep.
Firefox and Chromium are free software :)
-
jonas’
the push server may not be
-
pep.
True. Though if it's internal use, there's probably no obligation to redistribute their changes
-
pep.
Now.. IANAL
-
pep.
Maybe we should reject 357 because it's not possible to use it for web push internally /s
-
jonas’
pep., I’m pretty sure that’s false.
-
jonas’
since everything beyond the application server (which still needs to understand XMPP) is out of scope
-
pep.
I can't even joke without being accurate now :(
-
Zash
You could have the app server send an XMPP message over some existing connection. Or SMS. Or a carrier pidgeon.
-
pep.
Can I also publish my XEP "XMPP over ChaosPost"
-
jonas’
or in morse code with trump tweet time spacings
-
jonas’
pep., would be something for April 1st
-
pep.
But it'd be valid even if you need to pay a ticket to get to congress?
-
Zash
Is the specification for ChaosPost available?
-
pep.
https://c3post.de/
-
marc0s
hi, by reading XEP-0114 (Components) I understand that, given a component connecting with the proper `secret` it can act as any valid user since it's allowed to write whatever `from` it pleases, right?
-
Kev
On the domain that the component is hosting - which is a different domain from that of the server.
-
flow
marc0s, I'd say now
-
flow
err, 'no'
-
Kev
So if I'm isode.com, and I have a component authenticating as component.isode.com, that component can act as anything@component.isode.com, but not anything@isode.com.
-
marc0s
I'm currently bridging another system events via a permanently connected user account with admin privileges to create/destroy/manage MUCs based on that other system's events and I was wondering if a component would be a better approach
-
flow
marc0s, you may want to look at xep356 (and xep355)
-
marc0s
I see Kev, thanks
-
marc0s
flow, will have a look, thanks
-
Zash
In Prosody you can have Components named user@host, so there's that.
-
marc0s
Zash, so the component will be receiving all stanzas addressed to the bare jid I'd expect, isn't it?
-
MattJ
Zash, no idea if that has ever been tested with external components
-
marc0s
😀
-
MattJ
Also ssshh, it's not a feature we advertise :)
-
flow
uh, hidden features you are not supposed to talk about, now I wanna use it!
-
MattJ
When people find out you end up with things like dino@dino.im
-
pep.
chat@dino.im :)
-
MattJ
That's the one
-
jonas’
MattJ, and also rodrigo.de.mucobedo@dreckshal.de.
-
MattJ
:)
-
jonas’
which is mod_client_proxy, another abomination
-
Syed Ahmed Jamil
Hi can anyone help me with pubsub. I have an entity that is both publisher and subscriber. I want the xmpp server (openfire) to not send my own published item back to me ? Is there any node configuration that makes this behavior happen ?✎ -
Syed Ahmed Jamil
Is anyone online ?
-
jonas’
yes
-
jonas’
I don’t think what you’re asking for works with standard XEP-0060
-
Syed Ahmed Jamil
ok is there any other solution ?
-
jonas’
don’t worry about those "reflections"
-
jonas’
you can detect them by ID
-
Syed Ahmed Jamil
Basically they are a problem for my app. I am creating a collaborative whiteboard. I publish drawing events and listen to incoming messages. so whenever I draw I receive my own drawing events and it redraws on screen.
-
Syed Ahmed Jamil
which ID do you mean
-
Syed Ahmed Jamil
? ✏
-
Syed Ahmed Jamil
?
-
jonas’
Syed Ahmed Jamil, pubsub items have an ID
-
jonas’
if you set the ID when publishing (for example, to a randomly generated UUID), you can detect your own events and ignore them
-
Syed Ahmed Jamil
oh I see then I have to work on creating those unique id's
-
moparisthebest
id=ignoreme; if(id == ignorme) ignore()
-
Syed Ahmed Jamil
well if I set the id myself you mean when i will get that id in IQ stanza right ?
-
Syed Ahmed Jamil
basically now I have to set publisher id in every payload im sending from my app. now I have to update all those payloads to include publisher id as well
-
Syed Ahmed Jamil
Alas! I wish there was some configuration for that on the server side
-
jonas’
Syed Ahmed Jamil, no, I mean the ID of the pubsub item
-
jonas’
sorry, I misunderstood
-
jonas’
no, you’ll get the ID in the <message/> of the notification
-
jonas’
(notifications arrive via <message/>, not via <iq/>)
-
Syed Ahmed Jamil
yes I can see the random id in the message stanza I am receiving.
-
Syed Ahmed Jamil
now I just have to update all places in my code where I'm publishing an item to include my own unique id
-
Syed Ahmed Jamil
that is a real pain lol
-
Syed Ahmed Jamil
I really should have look at this earlier before creating all those pubsub events. I left this problem thinking I might be able to configure node some how.
-
Syed Ahmed Jamil
Anyway thanks Jonas and moparisthebest