Send message User Sessions

how can i use this function and have it send notifications immediately

Hi,
The way, how this function works, can’t be changed. It is meant purely for administrative purposes (e.g. warn users shortly before system maintenance).
If you need instant messaging to users, you can look at the “Global evens” addon to deliver messages fast.
See: Global Events – CUBA Platform
Demo project: GitHub - cuba-platform/global-events-demo: Global Events add-on demo project

i added it to my project but it didn’t work right away and it took a while to get a notification