mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
adjusted receiving of new message
This commit is contained in:
parent
219f53208d
commit
cae51b2ad4
1 changed files with 17 additions and 5 deletions
|
@ -422,16 +422,25 @@ function addObjToDatabase(newobj) {
|
||||||
// handle response
|
// handle response
|
||||||
console.log("new database entry");
|
console.log("new database entry");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|
||||||
|
|
||||||
|
if (newobj.command === "msg") {
|
||||||
|
chat.unsorted_chat_list.push(newobj);
|
||||||
|
chat.sorted_chat_list = sortChatList();
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
console.log(newobj);
|
||||||
|
|
||||||
|
// try upserting status in case we tried sending a message to our selfes
|
||||||
|
databaseUpsert(newobj.uuid, "status", newobj.status);
|
||||||
|
updateUnsortedChatListEntry(newobj.uuid, "status", newobj.status);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(newobj);
|
|
||||||
if (newobj.command === "msg") {
|
|
||||||
chat.unsorted_chat_list.push(newobj);
|
|
||||||
chat.sorted_chat_list = sortChatList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// upsert footer ...
|
// upsert footer ...
|
||||||
|
@ -461,6 +470,9 @@ function createChatIndex() {
|
||||||
"bytesperminute",
|
"bytesperminute",
|
||||||
"_attachments",
|
"_attachments",
|
||||||
"is_new",
|
"is_new",
|
||||||
|
"nacks",
|
||||||
|
"duration",
|
||||||
|
"speed_list"
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue