mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-22 17:22:22 -05:00
Fix message model to/from
This commit is contained in:
parent
ae364437ec
commit
5de45e0c12
@ -241,7 +241,7 @@ module.exports = function (client, app) {
|
|||||||
|
|
||||||
if (!contact.lockedResource) {
|
if (!contact.lockedResource) {
|
||||||
contact.lockedResource = msg.from.full;
|
contact.lockedResource = msg.from.full;
|
||||||
} else if (msg.from !== contact.lockedResource) {
|
} else if (msg.from.full !== contact.lockedResource) {
|
||||||
contact.lockedResource = undefined;
|
contact.lockedResource = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ module.exports = HumanModel.define({
|
|||||||
type: 'message',
|
type: 'message',
|
||||||
props: {
|
props: {
|
||||||
id: ['string', true, ''],
|
id: ['string', true, ''],
|
||||||
to: ['string', true, ''],
|
to: ['object', true],
|
||||||
from: ['string', true, ''],
|
from: ['object', true],
|
||||||
body: ['string', true, ''],
|
body: ['string', true, ''],
|
||||||
type: ['string', true, 'normal'],
|
type: ['string', true, 'normal'],
|
||||||
acked: ['bool', true, false],
|
acked: ['bool', true, false],
|
||||||
|
Loading…
Reference in New Issue
Block a user