Contact presence: Check for array with items, not truthiness
This commit is contained in:
parent
1a9547c98f
commit
a013e43299
1 changed files with 2 additions and 2 deletions
|
@ -1324,7 +1324,7 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
{
|
{
|
||||||
attachments,
|
attachments,
|
||||||
doForwardMessage,
|
doForwardMessage,
|
||||||
hasContact: Boolean(message.get('contact')),
|
hasContact: Boolean(message.get('contact')?.length),
|
||||||
isSticker: Boolean(message.get('sticker')),
|
isSticker: Boolean(message.get('sticker')),
|
||||||
messageBody: message.getRawText(),
|
messageBody: message.getRawText(),
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
|
@ -1468,7 +1468,7 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
},
|
},
|
||||||
{ ...sendMessageOptions, timestamp }
|
{ ...sendMessageOptions, timestamp }
|
||||||
);
|
);
|
||||||
} else if (contact) {
|
} else if (contact?.length) {
|
||||||
const contactWithHydratedAvatar = await loadContactData(contact);
|
const contactWithHydratedAvatar = await loadContactData(contact);
|
||||||
conversation.enqueueMessageForSend(
|
conversation.enqueueMessageForSend(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue