New MessageController as the single place for in-memory messages
This commit is contained in:
parent
274949b247
commit
74cb808763
11 changed files with 169 additions and 105 deletions
|
@ -729,13 +729,15 @@
|
|||
const collection = await window.Signal.Data.getMessagesBySentAt(id, {
|
||||
MessageCollection: Whisper.MessageCollection,
|
||||
});
|
||||
const messageFromDatabase = collection.find(item => {
|
||||
const messageAuthor = item.getContact();
|
||||
const found = Boolean(
|
||||
collection.find(item => {
|
||||
const messageAuthor = item.getContact();
|
||||
|
||||
return messageAuthor && author === messageAuthor.id;
|
||||
});
|
||||
return messageAuthor && author === messageAuthor.id;
|
||||
})
|
||||
);
|
||||
|
||||
if (messageFromDatabase) {
|
||||
if (found) {
|
||||
const toast = new Whisper.FoundButNotLoadedToast();
|
||||
toast.$el.appendTo(this.$el);
|
||||
toast.render();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue