1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

When room name is changed, show both the old and new name

Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
Aaron Raimist
2020-03-06 22:17:49 -06:00
parent 1530c91772
commit 7850c506b7
2 changed files with 5 additions and 3 deletions

View File

@@ -127,9 +127,11 @@ function textForRoomNameEvent(ev) {
if (!ev.getContent().name || ev.getContent().name.trim().length === 0) {
return _t('%(senderDisplayName)s removed the room name.', {senderDisplayName});
}
return _t('%(senderDisplayName)s changed the room name to %(roomName)s.', {
debugger;
return _t('%(senderDisplayName)s changed the room name from %(oldRoomName)s to %(newRoomName)s.', {
senderDisplayName,
roomName: ev.getContent().name,
oldRoomName: ev.getPrevContent().name,
newRoomName: ev.getContent().name,
});
}