Skip to content

Commit d78a74e

Browse files
committed
feat: show message blocked component for blocked messages
1 parent 7388456 commit d78a74e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

package/src/components/Message/Message.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
350350
const quotedMessage = message.quoted_message;
351351
if (error) {
352352
setIsErrorInMessage(true);
353+
/**
354+
* If its a Blocked message, we don't do anything as per specs.
355+
*/
356+
if (isBlockedMessage(message)) {
357+
return;
358+
}
353359
/**
354360
* If its a Bounced message, we open the message bounced options modal.
355361
*/
@@ -616,7 +622,7 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
616622
};
617623

618624
const onLongPress = () => {
619-
if (hasAttachmentActions || !enableLongPress) {
625+
if (hasAttachmentActions || isBlockedMessage(message) || !enableLongPress) {
620626
return;
621627
}
622628
// If a message is bounced, on long press the message bounce options modal should open.

0 commit comments

Comments
 (0)