What to do with XMPP - LiveWire - discussion about native xmpp client app

Livewire already uses XEP-0357 for push notifications. But that XEP only specifies that the XMPP server pushes a notification to an XMPP component. After that, the component is responsible for forwarding the notification onward to its destination. Livewire is using a modified version of Monal’s fpush that can push to the UBPorts Push Service for Ubuntu Touch, and now also UnifiedPush for Sailfish OS, since for some reason there is no native push service. This is why you must install the toot toot Foghorn to have working push notifications.

I would like UnifiedPush to be part of the base Sailfish system eventually.

Speculating about the current lack of push service, I’d assume Jolla didn’t want to define yet another push implementation nor commit to keep a push server running. (Unified push was not a thing back then.)

Not familiar with Monal or the XEPs, unfortunately, so maybe I’m talking out of my hat here. What I mean is that XMPP servers can (and do) provide push themselves that can be used by other apps as well. So not adding Mozilla to the mix, however nice as they may be, would seem natural to me when the first thing on Sailfish to use push would be XMPP.

This is based on my understanding of what conversations.im does - I think it acts like a UP provider with XMPP as the transport and Conversations-the-app (or a background service of it) provides a UP distributor.

Also, according to my understanding, Unified Push doesn’t specify the protocol between provider and distributor, so my question was if you would consider adding the protocol defined here:

(Sorry if you already answered about that, but I failed to understand!)

Conversations and its derivatives acting as a UnifiedPush provider is different than XMPP push notifications. A UP provider is using the XMPP server as the actual push service mechanism for UnifiedPush traffic. XMPP push notifications via XEP-0357 are push notifications from the XMPP server for messages and whatever else to a target device.

In the case of Foghorn, Mozilla’s push service is acting as the UnifiedPush provider, similar to the Sunup Android app. I plan to eventually add at least ntfy.sh and NextPush (NextCloud). I’m not really sure I will add XMPP as a UnifiedPush provider because it doesn’t entirely make sense if the XMPP connection can go down and be disconnected. I haven’t checked to see if UnifiedPush over XMPP can make use of XEP-0357 or not. And if it does, then you’re back to needing another UnifiedPush service. So running UP push provider mode would be mutually exclusive with push notifications for Livewire.

If all of this terminology is extremely confusing and circular, you’re not alone, believe me. :upside_down_face:

Edit: I have indeed considered adding the UnifiedPush provider mode to Livewire, and it may eventually show up (at least on SFOS, not UT). But it would require always connected mode, because otherwise it doesn’t make any sense.

Isn’t that acceptable, though? I mean the idea is to have push messages funneled through a single always-on connection to avoid uncoordinated wake ups? (In addition to having one more way to spy on people and lock them in, if you’re Apple or Google.)

It is confusing!

My understanding of UP is something like person or system default picks a push server, apps tell their servers to use that push server, distributor on device sends notifications to the target app(s). UP defines these protocols, except the one between push server and distributor, so the transport is not locked to a specific implementation.

Anyway, thank you for all your work on this! I hope it will eventually provide the base for general push notifications on Sailfish. (And let’s not derail this thread further…)

Thank you for this best xmpp client app for SF ever!
all works perfectly so far except muc group has no avatar icon (it is there set by monal) but this is nothing important in compare to native sf integration :))

Thank you.

MUC avatars (room images) are supported, and Should Work Just Fine. What kind of image format? How does the MUC broadcast its avatar? Might be that we are dropping some stanzas still. Best to join xmpp:livewire@conference.agnos.is?join

Edit: forum does not make the URI clickable. Sadness.

on the server vcard4 and vcard_legacy modules are enabled, in muc compoment config: muc_vcard = true
avatar is uploaded from jpeg image

Added second account and it looks like, i cannot switch between both of them, only one is shown in the list as active. Alse there is a (recursive) loop possibke: go to settings->switch accouts->settings->switch account->settings and so one…

Only one account can be active at a time. This is a limitation of the current design. The account switcher on SFOS is a bit messed up though. You have to explicitly log out from the pulley menu, then tap on the other account you want.

@projectmoon Seems like i don’t get push notifications on messages anyore. It was working before. maybe it isn’t working anymore since the last livewire update. Are their any logs of Foghorn or livewire i can check?

Try switching to a different connection mode and then back to push,wait for it to say push notifications validated. It’s a bit finicky.

You can look at foghornd logs in terminal or grep user journal for Livewire.

Thanks, that did the trick!

@projectmoon So, it seems like that push notifications often gets disabled, after loosing or switching network connections. Would a check and rexonnect option in Livewire or foghorn possible?

Edit: I just got a message from livewire that Push Notifications stopped working abd that it goes back to polling. This was the first time i saw this message.

Foghorn will automatically reconnect to Mozilla push service on network switch, but yes, Livewire’s validation for whether or not the push registration is functioning is a bit finicky, especially under bad network connectivity. On SFOS it will automatically disable push notifications if it cannot complete the XEP-0357 registration, which can happen on bad or unstable network connections. So there probably needs to be some hardening around that. I have noticed this behavior as well. There is an issue tracking it now: https://git.agnos.is/projectmoon/livewire/issues/69

It’s not my highest priority, but the next release will be 0.5.1, focused specifically on various bugs/foundational issues, so I will try to address it at least in part in this upcoming release.

Thanks again for your work! I saw the release of 0.60 an hour ago :+1:

Yes, technically an RC release. But if there are no serious problems, then I will upload it to OpenRepos tomorrow or so.

Btw from last community news:

Some have been asking about open sourcing more components i.e. continuing where we left last spring. We’ll continue that effort later this year once we have a bit more bandwidth. There are good candidates such as XMPP account integration which was asked at point.

Just curious if you plan to go that way or is it going to stay as separate set of apps? (the unified push for an xmpp app seems kinda pointless as unified push just is an active xmpp connection where non-xmpp apps can queue their own notifications, but eventually might save some battery if you use more than one, just mentioning as the connection from sytem xmpp account is already active, so the keeping foghorn active just for that same (but extra) xmpp connection (but to mozilla) will make even less sense and actually be counterproductive in terms of battery savings)

I have no plans for direct integration with the Messages app, which I assume is written in C++. It uses telepathy as a backend for various message providers, and I don’t think it would be easy to connect Livewire into Telepathy.

As for UnifiedPush, Livewire is not a UnifiedPush distributor. The UP connection is only for XEP-0357 push notifications, and Foghorn does not only exist for Livewire (although it was created to make the XMPP push notifications work on SFOS, yes). The intent is for other apps that need push to use it as well. And I will use it for another app, once I get around to porting it.

Cool, just the discussion about push/unified push seemed a bit hallucinatory, xmpp app needing mozilla to proxy its own server pushes… Why even start the second xmpp connection to mozilla. But cool, if foghorn is the main project, awesome, shame about not expandig the native xmpp capabilities
(btw push notifications already exist on sfos with the native xmpp account, there is an active tcp connection to the xmpp server and you get messages right away, no need for UP proxies, EDIT: of course no omemo etc etc, but it is functionally push)

Livewire on SFOS can run in one of three connection modes: always connected (i.e. persistent TCP connection), polling (wake every 2.5 mins using the native keep-alive), or push (via Foghorn). You don’t have to use XEP-0357.