be sure to send open group messages in order

pull/1381/head
Audric Ackermann 5 years ago
parent 220de2cd0a
commit efa45f7cbe

@ -1127,7 +1127,7 @@
async sendMessageJob(message) {
try {
const uploads = await message.uploadData();
const id = message.id;
const { id } = message;
const expireTimer = this.get('expireTimer');
const destination = this.id;
@ -1236,6 +1236,7 @@
throw new TypeError(`Invalid conversation type: '${this.get('type')}'`);
} catch (e) {
await message.saveErrors(e);
return null;
}
},
async sendMessage(
@ -1252,7 +1253,6 @@
const expireTimer = this.get('expireTimer');
const recipients = this.getRecipients();
this.queueJob(async () => {
const now = Date.now();
window.log.info(
@ -1344,8 +1344,11 @@
await message.saveErrors(errors);
return null;
}
void this.sendMessageJob(message);
this.queueJob(async () => {
await this.sendMessageJob(message);
});
return null;
},
async updateAvatarOnPublicChat({ url, profileKey }) {

@ -1723,7 +1723,7 @@ class LokiPublicChannelAPI {
}
const pubKey = adnMessage.user.username;
try {
const messengerData = await this.getMessengerData(adnMessage);
if (messengerData === false) {
return false;
@ -1839,6 +1839,10 @@ class LokiPublicChannelAPI {
// now process any user meta data updates
// - update their conversation with a potentially new avatar
return messageData;
} catch (e) {
window.log.error('pollOnceForMessages: caught error:', e);
return false;
}
})
);

Loading…
Cancel
Save