if (file !== null) roomsInput.setAttachment(roomId, file);
}
- const canISend = roomTimeline.room.currentState.maySendMessage(mx.getUserId());
-
function renderInputs() {
- if (!canISend) {
+ const canISend = roomTimeline.room.currentState.maySendMessage(mx.getUserId());
+ const tombstoneEvent = roomTimeline.room.currentState.getStateEvents('m.room.tombstone')[0];
+ if (!canISend || tombstoneEvent) {
return (
- <Text className="room-input__alert">You do not have permission to post to this room</Text>
+ <Text className="room-input__alert">
+ {
+ tombstoneEvent
+ ? tombstoneEvent.getContent()?.body ?? 'This room has been replaced and is no longer active.'
+ : 'You do not have permission to post to this room'
+ }
+ </Text>
);
}
return (