From f662023480c2b4eddd13a5dcc096d587450da41a Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 23 Sep 2022 13:00:40 -0400 Subject: [PATCH] Add other actions for non-current-user messages --- .../chats/components/chat-message-list.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/soapbox/features/chats/components/chat-message-list.tsx b/app/soapbox/features/chats/components/chat-message-list.tsx index 11818c488..ccfcea91d 100644 --- a/app/soapbox/features/chats/components/chat-message-list.tsx +++ b/app/soapbox/features/chats/components/chat-message-list.tsx @@ -30,6 +30,8 @@ const messages = defineMessages({ more: { id: 'chats.actions.more', defaultMessage: 'More' }, delete: { id: 'chats.actions.delete', defaultMessage: 'Delete for both' }, copy: { id: 'chats.actions.copy', defaultMessage: 'Copy' }, + report: { id: 'chats.actions.report', defaultMessage: 'Report' }, + deleteForMe: { id: 'chats.actions.deleteForMe', defaultMessage: 'Delete for me' }, blockedBy: { id: 'chat_message_list.blockedBy', defaultMessage: 'You are blocked by' }, networkFailureTitle: { id: 'chat_message_list.network_failure.title', defaultMessage: 'Whoops!' }, networkFailureSubtitle: { id: 'chat_message_list.network_failure.subtitle', defaultMessage: 'We encountered a network failure.' }, @@ -241,6 +243,18 @@ const ChatMessageList: React.FC = ({ chat, autosize }) => { icon: require('@tabler/icons/trash.svg'), destructive: true, }); + } else { + menu.push({ + text: intl.formatMessage(messages.report), + action: () => null, // TODO: implement once API is available + icon: require('@tabler/icons/flag.svg'), + }); + menu.push({ + text: intl.formatMessage(messages.deleteForMe), + action: () => null, // TODO: implement once API is available + icon: require('@tabler/icons/trash.svg'), + destructive: true, + }); } return (