From b403b8922482d6e68803458ef7af1156a562c541 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 10 Jun 2021 12:26:48 +1000 Subject: [PATCH] fix bug with quote empty profileName --- ts/models/message.ts | 5 +++-- ts/session/snode_api/onions.ts | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/models/message.ts b/ts/models/message.ts index 4d6e9cae9..00a31d22a 100644 --- a/ts/models/message.ts +++ b/ts/models/message.ts @@ -639,9 +639,10 @@ export class MessageModel extends Backbone.Model { } const { author, id, referencedMessageNotFound } = quote; - const contact = author && ConversationController.getInstance().get(author); + const contact: ConversationModel = author && ConversationController.getInstance().get(author); + + const authorName = contact ? contact.getContactProfileNameOrShortenedPubKey() : null; - const authorName = contact ? contact.getName() : null; const isFromMe = contact ? contact.id === UserUtils.getOurPubKeyStrFromCache() : false; const onClick = noClick ? null diff --git a/ts/session/snode_api/onions.ts b/ts/session/snode_api/onions.ts index c22d65bf1..8c2459b3f 100644 --- a/ts/session/snode_api/onions.ts +++ b/ts/session/snode_api/onions.ts @@ -535,7 +535,6 @@ async function handle421InvalidSwarm({ await dropSnodeFromSwarmIfNeeded(associatedWith, snodeEd25519); } catch (e) { if (e.message !== exceptionMessage) { - console.warn('dropSnodeFromSwarmIfNeeded', snodeEd25519); window?.log?.warn( 'Got error while parsing 421 result. Dropping this snode from the swarm of this pubkey', e