Fix away.js allowing any user to disable away.js

This commit is contained in:
Ryan Huffman 2016-10-27 11:12:31 -07:00
parent ab8e5759b0
commit a801832a55

View file

@ -304,7 +304,7 @@ function setEnabled(value) {
var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable";
var handleMessage = function(channel, message, sender) {
if (channel === CHANNEL_AWAY_ENABLE) {
if (channel === CHANNEL_AWAY_ENABLE && sender === MyAvatar.sessionUUID) {
print("away.js | Got message on Hifi-Away-Enable: ", message);
setEnabled(message === 'enable');
}