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
404 B

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