It seems besides the custom channels provided in this addon it also catches messages from other channels. E.g. in this case it seems the void popup is triggered by these activity creation bus messages.
**Steps to reproduce**
Odoo commit: could reproduce on 5e8b667951 and 4da82776ff
OCA/web commit: 2465278
* Install crm and web_notify modules
* Create an activity for yourself (tried for admin user)
* Empty popup appears
**Attempt to solve**
It seems the bus handles all messages non exclusively. I've hacked in a conditional to handle only messages from web_notify addon, but its unclear wether this does not break something else.
* [ADD]: all available bootstrap notifications (success/danger/warning/info/default)
* [IMP] use black color for text for default notification.
* [FIX] reverted require string for `bus.Longpolling` and rename `on_message_received` to `on_message` to prevent collisions.
Add self-test buttons in demo environment,
Updated readme to show how to test it.
Add buttons to users form
Do not rely on SUPERUSER_ID and avoid getattr usage
Only the admin user (sudo) is allowed to send notifications to other
users. The normal users can only send notifications to themselves.
This is to prevent attackers to craft malicious notifications and send
them to other users using RPC.
Correction based on the idea of @hbrunn
- Use the 'session' class of the JS Framework (session no lounger bound
to web client)
- Test change: compare emitted & received messages based on content, not
order. Using string comparison raises false positives.
Fix a check when comparing a user count with items within a mock call.
The previous method was succeeding by pure luck because OCA test
databases contain 2 users, which happens to be the amount of items
within a mock "call_args" (it contains args + kwargs).