1
0
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:
Lance Stout 2013-09-12 12:03:58 -07:00
parent 6b4b440990
commit b8b6f03fca
2 changed files with 12 additions and 10 deletions

View File

@ -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++;

View File

@ -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({