mirror of https://github.com/vector-im/riot-web
fix flashing `by ""`
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
9dd204dd10
commit
a399b1018a
|
@ -29,7 +29,7 @@ const RedactedBody = React.forwardRef<any, IProps>(({mxEvent}, ref) => {
|
|||
|
||||
let text = _t("Message deleted");
|
||||
const redactedBecauseUserId = mxEvent.getUnsigned().redacted_because.sender;
|
||||
if (redactedBecauseUserId !== cli.getUserId()) {
|
||||
if (redactedBecauseUserId && redactedBecauseUserId !== cli.getUserId()) {
|
||||
const room = cli.getRoom(mxEvent.getRoomId());
|
||||
const sender = room && room.getMember(redactedBecauseUserId);
|
||||
text = _t("Message deleted by %(name)s", { name: sender ? sender.name : redactedBecauseUserId });
|
||||
|
|
Loading…
Reference in New Issue