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
|
@ -1,8 +1,11 @@
|
|||
/* global _: false */
|
||||
/* global Backbone: false */
|
||||
/* global i18n: false */
|
||||
/* global moment: false */
|
||||
/* global Whisper: false */
|
||||
/* global
|
||||
_,
|
||||
Backbone,
|
||||
i18n,
|
||||
MessageController,
|
||||
moment,
|
||||
Whisper
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
(function() {
|
||||
|
@ -18,7 +21,9 @@
|
|||
});
|
||||
|
||||
await Promise.all(
|
||||
messages.map(async message => {
|
||||
messages.map(async fromDB => {
|
||||
const message = MessageController.register(fromDB.id, fromDB);
|
||||
|
||||
window.log.info('Message expired', {
|
||||
sentAt: message.get('sent_at'),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue