Wrong count of push notifications

Description

Hello everybody!
Noticed a strange thing in the cloud console.
I am the only one logged into the android application, the daily notification counter shows 5 pushes … A colleague sends me a message, a push arrives and after refreshing the page the console shows 7 push notifications. How can this be? Why does 1 push actually count as 2?

Server Setup Information

  • Version of Rocket.Chat Server: 3.8.3
  • Operating System: Debian 10
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 12.18.4
  • MongoDB Version: 3.6.14
  • Proxy: apache
  • Firewalls involved:

Any additional Information

The reason for this behavior is that records of tokens of unused devices may remain in the database.
Solution:

  1. remove applications from all devices used;
  2. find the old token in the database by user id
    Db.getCollection ('_ raix_push_app_tokens'). find ({userId: 'You-UserId'})
  3. delete old token
    Db.getCollection ('_ raix_push_app_tokens'). deleteOne ({userId:' You-UserId})
  4. install the application on the desired device and log in.

Now push notifications will come and be counted correctly in the cloud console.
Revision the devices used and leave the application only on the really needed ones, otherwise the push limit will be reached very quickly.