An end-of-day update.
I have tried to make a script to upgrade the messages and notification every third second with this:
define(['jquery'])
setInterval(realtime_absalon_update, 3000);
function realtime_absalon_update() {
var request = {
methodname: 'core_message_get_unread_conversations_count',
args: args
};
var promise = Ajax.call([request])[0];
alert(promise)
};
It won't work though, it says 'args is not defined'.
I tried to sort that by loading the javascript from core, but it won't load it with this:
require([core_message/message_repository]);
If anyone got any ideas, then i really appreciate it.