pull/1137/head
Audric Ackermann 5 years ago
parent a656e3ba3f
commit d48063dc82
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -262,7 +262,7 @@
messages.forEach(m => { messages.forEach(m => {
m.acceptFriendRequest(); m.acceptFriendRequest();
lastMessage = m; lastMessage = m;
}) });
if (lastMessage) { if (lastMessage) {
await this.markRead(); await this.markRead();

@ -665,7 +665,8 @@ MessageSender.prototype = {
return Promise.resolve(); return Promise.resolve();
} }
// first get all friends with primary devices // first get all friends with primary devices
const sessionContactsPrimary = conversations.filter( const sessionContactsPrimary =
conversations.filter(
c => c =>
c.isPrivate() && c.isPrivate() &&
!c.isOurLocalDevice() && !c.isOurLocalDevice() &&
@ -683,14 +684,21 @@ MessageSender.prototype = {
); );
// then morph all secondary conversation to their primary // then morph all secondary conversation to their primary
sessionContactsSecondary = await Promise.all(sessionContactsSecondary.map(async c => { sessionContactsSecondary =
(await Promise.all(
// eslint-disable-next-line arrow-body-style
sessionContactsSecondary.map(async c => {
return window.ConversationController.getOrCreateAndWait( return window.ConversationController.getOrCreateAndWait(
c.getPrimaryDevicePubKey(), c.getPrimaryDevicePubKey(),
'private' 'private'
); );
})) || []; })
)) || [];
const contactsSet = new Set([...sessionContactsPrimary, ...sessionContactsSecondary]); const contactsSet = new Set([
...sessionContactsPrimary,
...sessionContactsSecondary,
]);
const contacts = [...contactsSet]; const contacts = [...contactsSet];
if (contacts.length === 0) { if (contacts.length === 0) {

Loading…
Cancel
Save