1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2025-02-16 15:10:11 -05:00

Lock resource on inbound message

This commit is contained in:
Lance Stout 2013-09-20 09:52:36 -07:00
parent 83eb4fb0b5
commit 2601de8eec

View File

@ -216,6 +216,8 @@ module.exports = function (client, app) {
console.log(info.chatState);
if (info.chatState === 'gone') {
contact.lockedResource = undefined;
} else {
contact.lockedResource = info.from.full;
}
}
} else if (me.isMe(info.from)) {
@ -247,12 +249,7 @@ module.exports = function (client, app) {
}
contact.addMessage(message, true);
if (!contact.lockedResource) {
contact.lockedResource = msg.from.full;
} else if (msg.from.full !== contact.lockedResource) {
contact.lockedResource = undefined;
}
contact.lockedResource = msg.from.full;
}
});