diff --git a/.changeset/feat-dismiss-local-echo.md b/.changeset/feat-dismiss-local-echo.md new file mode 100644 index 000000000..4fa2adbb4 --- /dev/null +++ b/.changeset/feat-dismiss-local-echo.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add a "Dismiss" button to command response messages. diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 4bfab3bbb..6a6a7340a 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -679,6 +679,7 @@ function MessageInternal( ); const MSG_CONTENT_STYLE = { maxWidth: '100%' }; + const isSableFeedback = mEvent.getId()?.startsWith('~sable-feedback-'); const msgContentJSX = ( )} + {isSableFeedback && ( + + + + Only you can see this. + + { + evt.preventDefault(); + evt.stopPropagation(); + const eventId = mEvent.getId(); + if (eventId) { + room.removeEvent(eventId); + room.emit(RoomEvent.LocalEchoUpdated, mEvent, room); + } + }} + > + Dismiss + + + )} );