Don't render links (or link previews) for blocked or unapproved conversations

This commit is contained in:
Evan Hahn 2021-02-02 11:09:53 -06:00 committed by GitHub
parent 267ae80442
commit 8f1bb6f087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 105 additions and 33 deletions

View file

@ -876,6 +876,11 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
deletedForEveryone: this.get('deletedForEveryone') || false,
bodyRanges: this.processBodyRanges(),
isMessageRequestAccepted: conversation
? conversation.getAccepted()
: true,
isBlocked: Boolean(conversation?.isBlocked()),
};
}