Adds a new setting to prevent Livechat agents from activating service status when office hours are closed. (#14921)
parent
3661c63872
commit
da42a954bf
@ -1,15 +0,0 @@ |
||||
import { Meteor } from 'meteor/meteor'; |
||||
|
||||
Meteor.methods({ |
||||
'livechat:changeLivechatStatus'() { |
||||
if (!Meteor.userId()) { |
||||
return false; |
||||
} |
||||
|
||||
const user = Meteor.user(); |
||||
|
||||
const newStatus = user.statusLivechat === 'available' ? 'not-available' : 'available'; |
||||
|
||||
Meteor.users.update(user._id, { $set: { statusLivechat: newStatus } }); |
||||
}, |
||||
}); |
Loading…
Reference in new issue