[QUESTION] Push notifications are only sent to one user session
Your Rocket.Chat.Android app version: 1.0.21-DEBUG Your Rocket.Chat server version: 0.58.2 Device model (or emulator) you're running with: Galaxy A3 - Android 6.0.1 / linux rocket.chat+ 2.9.0
Steps to reproduce:
- Connect to your server with your mobile phone
- Connect to your server with your desktop app
- Wait for a message or a mention
- The notification is given to your desktop app but not to your mobile phone
I'm always connected to rocket.chat on my computer, and I usually leave it running when I have work in progress. But then, I don't get notifications on my mobile phone. It would be nice to give push notifications to every user sessions rocket.chat has, or at least make that an option ...
Hum ... I realize it's probably more a server side problem ... I should post this in https://github.com/RocketChat/Rocket.Chat/issues , shouldn't I ? :p
@Alhrath Yes, but this is how supposedly it should work I think. What's your status (busy, away...?) on the desktop when you don't receive the notification?
Tested with all status, it does the same : no notification sent.
@Alhrath The notification isn't sent, or you don't receive it?
When I'm connected only by mobile :
(uiQQZ764ZNNTq8QP8 / nietzsche is another test user in the channel
dQjzwXPCu3J69tmQk / jonas is my usual user where I want to get notification
wTFu5YDTQc3MRgis2 / newuser is the test user who I use to send the message )
[34mI20171009-13:53:21.843(2) [34mMeteor ➔ method stream-notify-room -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH/typing', '1': 'newuser', '2': true }
[34mI20171009-13:53:23.130(2) [34mMeteor ➔ method stream-notify-room -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH/typing', '1': 'newuser', '2': false }
[34mI20171009-13:53:23.178(2) [34mMeteor ➔ method sendMessage -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': { _id: 'KMCsbdkCXuWkySeXE', rid: 'AMgL4BqTsjgKRmxmH', msg: 'test' } }
[34mI20171009-13:53:23.200(2) [34mMeteor ➔ method canAccessRoom -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH', '1': 'wTFu5YDTQc3MRgis2' }
[34mI20171009-13:53:23.271(2) [34mMeteor ➔ method canAccessRoom -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH', '1': 'aLJ82QjHCNLEjThZd' }
[34mI20171009-13:53:23.840(2) [34mIntegrations ➔ Outgoing WebHook.debug Execute Trigger: sendMessage
[34mI20171009-13:53:23.853(2) [34mIntegrations ➔ Outgoing WebHook.debug Got the event arguments for the event: sendMessage { event: 'sendMessage', message: { _id: 'KMCsbdkCXuWkySeXE', rid: 'AMgL4BqTsjgKRmxmH', msg: 'test', ts: Mon Oct 09 2017 13:53:23 GMT+0200 (CEST), u: { _id: 'wTFu5YDTQc3MRgis2', username: 'newuser', name: 'NewUser' }, mentions: [], channels: [], _updatedAt: Mon Oct 09 2017 13:53:23 GMT+0200 (CEST), sandstormSessionId: null }, room: { name: 'test', fname: 'test', t: 'c', msgs: 91, u: { _id: 'dQjzwXPCu3J69tmQk', username: 'jonas' }, customFields: {}, ts: Sat Sep 23 2017 18:19:44 GMT+0200 (CEST), ro: false, sysMes: true, _updatedAt: Mon Oct 09 2017 13:45:16 GMT+0200 (CEST), _id: 'AMgL4BqTsjgKRmxmH', meta: { revision: 93, created: 1506183584402, version: 0, updated: 1507549516536 }, '$loki': 41, username: 'newuser', lm: Mon Oct 09 2017 13:45:16 GMT+0200 (CEST), usernames: [ 'newuser', 'nietzsche', 'jonas' ] } }
[34mI20171009-13:53:23.857(2) [34mIntegrations ➔ Outgoing WebHook.debug Starting search for triggers for the room: AMgL4BqTsjgKRmxmH
[34mI20171009-13:53:23.863(2) [34mIntegrations ➔ Outgoing WebHook.debug Found 0 to iterate over and see if the match the event.
[34mI20171009-13:53:24.413(2) Push: send message "#test" via query { userId: 'uiQQZ764ZNNTq8QP8' }
[34mI20171009-13:53:24.442(2) Push: send message "#test" via query { userId: 'dQjzwXPCu3J69tmQk' }
[34mI20171009-13:53:24.450(2) Push: send to token { gcm: 'dqbmsicLBtI:APA91bHvmOhQZrW61vaeu3NaL_-t1JrSoIOloSC21CETc9JDsiNIELD2p8xONTL979B3xUoDRSQqd3zaNTLUSxA2kFUgXxhS3WekSWfdlSWhhshqEBNkRXK3qhU7dJQQxpCi4Yj_1aNN' }
[34mI20171009-13:53:24.471(2) Push: send to token { gcm: 'ewa7gDQiyFY:APA91bHTujgbtVT0GkOEFDSHNBt0j3rKGjs34_fHtGT50ifEHxoFN-VGGggP2EK4G8YNupQ04JCL--qIYqyCw4wJ4qKuwgsoPs59jdDm0T9CuOxeP63nuToq9H8iGg48PIFqcyT7bf7o' }
[34mI20171009-13:53:24.478(2) Push: send to token { gcm: 'dyZQbw8T1Qg:APA91bGLyhC18GXCArzatJmLP5Xx-W5gNAatKorNMnzQi6bchEODnot3DmrKU5CkAWIXf0md-3GnVlrZYcr5hhh8U9g0rHY1_RQGcNnmh6dmxv-vq1xNbJe-iLdkP7Gg8PEKK-zrfQmb' }
And when I'm connected both by mobile and by desktop I only have :
[34mI20171009-13:54:34.489(2) [34mMeteor ➔ method stream-notify-room -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH/typing', '1': 'newuser', '2': true }
[34mI20171009-13:54:36.122(2) [34mMeteor ➔ method stream-notify-room -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH/typing', '1': 'newuser', '2': false }
[34mI20171009-13:54:36.150(2) [34mMeteor ➔ method sendMessage -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': { _id: 'WwDE3LHfd4fLsYwmF', rid: 'AMgL4BqTsjgKRmxmH', msg: 'test' } }
[34mI20171009-13:54:36.157(2) [34mMeteor ➔ method canAccessRoom -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH', '1': 'wTFu5YDTQc3MRgis2' }
[34mI20171009-13:54:36.209(2) [34mMeteor ➔ method canAccessRoom -> userId: wTFu5YDTQc3MRgis2 , arguments: { '0': 'AMgL4BqTsjgKRmxmH', '1': 'aLJ82QjHCNLEjThZd' }
[34mI20171009-13:54:36.306(2) [34mIntegrations ➔ Outgoing WebHook.debug Execute Trigger: sendMessage
[34mI20171009-13:54:36.315(2) [34mIntegrations ➔ Outgoing WebHook.debug Got the event arguments for the event: sendMessage { event: 'sendMessage', message: { _id: 'WwDE3LHfd4fLsYwmF', rid: 'AMgL4BqTsjgKRmxmH', msg: 'test', ts: Mon Oct 09 2017 13:54:36 GMT+0200 (CEST), u: { _id: 'wTFu5YDTQc3MRgis2', username: 'newuser', name: 'NewUser' }, mentions: [], channels: [], _updatedAt: Mon Oct 09 2017 13:54:36 GMT+0200 (CEST), sandstormSessionId: null }, room: { name: 'test', fname: 'test', t: 'c', msgs: 92, u: { _id: 'dQjzwXPCu3J69tmQk', username: 'jonas' }, customFields: {}, ts: Sat Sep 23 2017 18:19:44 GMT+0200 (CEST), ro: false, sysMes: true, _updatedAt: Mon Oct 09 2017 13:53:23 GMT+0200 (CEST), _id: 'AMgL4BqTsjgKRmxmH', meta: { revision: 94, created: 1506183584402, version: 0, updated: 1507550003395 }, '$loki': 41, username: 'newuser', lm: Mon Oct 09 2017 13:53:23 GMT+0200 (CEST), usernames: [ 'newuser', 'nietzsche', 'jonas' ] } }
[34mI20171009-13:54:36.319(2) [34mIntegrations ➔ Outgoing WebHook.debug Starting search for triggers for the room: AMgL4BqTsjgKRmxmH
[34mI20171009-13:54:36.324(2) [34mIntegrations ➔ Outgoing WebHook.debug Found 0 to iterate over and see if the match the event.
[34mI20171009-13:54:37.007(2) Push: send message "#test" via query { userId: 'uiQQZ764ZNNTq8QP8' }
@Alhrath Can you please open this issue in our main repository? Looks like the back-end isn't sending the push notification for a reason (maybe a internal rule). Here's the link: http://github.com/RocketChat/Rocket.Chat. Please, link to this issue so we can follow the thread.
Will do so as soon as I setup a development server on latest rc release, to avoid confusion on the code.