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:
parent
83eb4fb0b5
commit
2601de8eec
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user