tigase / siskin-im

(M) Public Project of Tigase Messenger for iOS devices based on Tigase Swift XMPP library.
GNU General Public License v3.0
173 stars 37 forks source link

Notifications don't work in MUC #25

Open jnaeff opened 4 years ago

jnaeff commented 4 years ago

Describe the bug Notifications don't work in MUC

To Reproduce Steps to reproduce the behaviour:

  1. Let member send a message in MUC chat.
  2. Now you should get a notification on your iPhone.

Expected behaviour You don't get a notification only when you open Siskim.

Smartphone (please complete the following information):

hantu85 commented 4 years ago

Push notifications for MUC work only with servers that support forwarding them (MUC push notifications) and MUC rooms which are push notifications aware.

What server are you using?

Moreover, to give some background, in MUC protocol, when your client goes offline, the classic MUC room removes you from the list of participants and stops sending messages to your server. There are a few specifications to support push notifications from MUC rooms, but they are incompatible and there is no standard specification supported by everyone (servers and clients).

hantu85 commented 4 years ago

If in SiskinIM you cannot enable push notifications for your MUC room (in MUC room settings) then it is not possible to receive push notifications for messages while you are offline.

joshimio commented 4 years ago

Push notifications for MUC work only with servers that support forwarding them (MUC push notifications) and MUC rooms which are push notifications aware.

What server are you using?

Moreover, to give some background, in MUC protocol, when your client goes offline, the classic MUC room removes you from the list of participants and stops sending messages to your server. There are a few specifications to support push notifications from MUC rooms, but they are incompatible and there is no standard specification supported by everyone (servers and clients).

Which XEP is this? And do you know any public servers which support this feature? Thanks.

hantu85 commented 4 years ago

Siskin IM is developed by Tigase, so it is developed with Tigase XMPP Server, but we are using other servers for testing as well.

There is no XEP which adds support for notifications from MUC room AFAIK. Siskin IM actually registers user nickname (in the MUC room) using ad-hoc command and "toggles" notifications for offline messages.

That feature is available on tigase.im & sure.im servers and their MUC components. It is may also be available and enabled on any public XMPP server running the newest version of Tigase XMPP Server.

Due to the issues with MUC (and offline message delivery - multiple standards (each server has its own)), we are adding support for MIX (improved multi-user chat protocol) which supports offline message delivery out of the box. With upcoming releases of SiskinIM and BeagleIM that will be available and we will still support MUC. Hopefully, at some point, it will be possible to switch from MUC to MIX.

joshimio commented 3 years ago

MUC push notifications on iOS don't seem to work with MIX either.

I created a group chat on Beagle IM with MIX enabled (mix.sure.im). Invitation sent to account on iOS 12.4.8 and Siskin IM 6.0 using an xmpp.cloud account. No notification on the group chat if the iphone is asleep.

hantu85 commented 3 years ago

Where you mentioned in a message? if not, then by default you will not get notifications. In the channel configuration there is a setting to configure that.

Thanks to that everyone can decide if and when he wants to receive notifications from a channel.

joshimio commented 3 years ago

Where you mentioned in a message? if not, then by default you will not get notifications. In the channel configuration there is a setting to configure that.

Thanks to that everyone can decide if and when he wants to receive notifications from a channel.

The channel configuration on the iphone has Notifications set to Always. All notifications, whether I'm mentioned or not, come through if the phone is awake. It's only when the phone sleeps that the group chat notifications stop.

hantu85 commented 3 years ago

Could you clarify which channel have you created at mix.sure.im? We had issues with this installation and currently I do not see any MIX channel there. Those issues could impact sending messages and push notifications as well.

joshimio commented 3 years ago

Could you clarify which channel have you created at mix.sure.im? We had issues with this installation and currently I do not see any MIX channel there. Those issues could impact sending messages and push notifications as well.

Sure, it's jone01.mix.sure.im

hantu85 commented 3 years ago

Do you have any other active device on the same account?

hantu85 commented 3 years ago

Weird thing is, that I see on the server that both accounts connected to that channel have push set to Never. Could you try changing this setting to other value and then back to Always? I'll double check results on the server side. Please not that this change is only updated on the server when account is connected to the XMPP server.

joshimio commented 3 years ago

Do you have any other active device on the same account?

My sure.im account is stuck on the iphone. it won't let me delete it, comes up with a warning, "Push notifications are enabled, they need to be disabled before account can be removed." So I just disabled the account on the iphone and left it there. That same sure.im account is logged in on the mac with Beagle IM.

Weird thing is, that I see on the server that both accounts connected to that channel have push set to Never. Could you try changing this setting to other value and then back to Always? I'll double check results on the server side. Please not that this change is only updated on the server when account is connected to the XMPP server.

Ok I toggled the notifications on xmpp.cloud/iphone on and off. I can't see where these settings are on sure.im/beagle

hantu85 commented 3 years ago

On the server side I do see that now you have for channel **mixtest** (that is a part of a channel's name) has notifications enabled with Always. As for the stuck account, what is actually going on? It should connected or not if it is not possible. Just be warned that if you have account (even disabled) if server is not aware of the push notifications being disabled it may still send them.

hantu85 commented 3 years ago

And those settings are invisible to the BeagleIM.

joshimio commented 3 years ago

Ok so I started over again and everything seems to be working. It looks like the default notification is 'When mentioned' but Siskin shows 'Always' as ticked. So I had to toggle it as you suggested.

joshimio commented 3 years ago

So I've been testing this again with ios 14.0.1/siskin im 6.0 and getting the same problem. Push notification not working with mix. Notifications set to Always under group settings.