mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-12 04:25:05 -05:00
Re-enable archive ids
This commit is contained in:
parent
6b4b440990
commit
b8b6f03fca
@ -205,17 +205,19 @@ module.exports = function (client, app) {
|
||||
var contact = me.getContact(msg.from, msg.to);
|
||||
if (contact && !msg.replace) {
|
||||
var message = new Message();
|
||||
if (msg.id) {
|
||||
message.cid = msg.id;
|
||||
}
|
||||
message.set(msg);
|
||||
|
||||
//if (msg.archived) {
|
||||
// msg.archived.forEach(function (archived) {
|
||||
// if (me.isMe(archived.by)) {
|
||||
// message.id = archived.id;
|
||||
// message.cid = msg.id;
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
if (msg.archived) {
|
||||
msg.archived.forEach(function (archived) {
|
||||
if (me.isMe(archived.by)) {
|
||||
message.id = archived.id;
|
||||
message.cid = msg.id || archived.id;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!contact.activeContact && msg.from.bare === contact.jid) {
|
||||
contact.unreadCount++;
|
||||
|
@ -3072,7 +3072,7 @@ Prefs.prototype = {
|
||||
|
||||
|
||||
Message.prototype.__defineGetter__('archived', function () {
|
||||
var archives = stanza.find(this.xml, this.NS, 'archived');
|
||||
var archives = stanza.find(this.xml, 'urn:xmpp:mam:tmp', 'archived');
|
||||
var results = [];
|
||||
archives.forEach(function (archive) {
|
||||
results.push({
|
||||
|
Loading…
Reference in New Issue
Block a user