The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/livechat/server/agentStatus.js

10 lines
395 B

import { UserPresenceMonitor } from 'meteor/konecty:user-presence';
import { Livechat } from './lib/Livechat';
import { hasAnyRole } from '../../authorization/server/functions/hasRole';
UserPresenceMonitor.onSetUserStatus((user, status) => {
if (hasAnyRole(user._id, ['livechat-manager', 'livechat-monitor', 'livechat-agent'])) {
Livechat.notifyAgentStatusChanged(user._id, status);
}
});