mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-01-27 08:41:52 +00:00
fix displayname condition
This commit is contained in:
parent
8068dc2cbb
commit
03b0474a2c
|
@ -28,7 +28,7 @@ export const useMemberEventParser = (): MemberEventParser => {
|
|||
|
||||
const senderName = getMxIdLocalPart(senderId);
|
||||
const userName =
|
||||
content.displayname && typeof content.displayname === 'string'
|
||||
typeof content.displayname === 'string'
|
||||
? content.displayname || getMxIdLocalPart(userId)
|
||||
: getMxIdLocalPart(userId);
|
||||
|
||||
|
@ -179,14 +179,14 @@ export const useMemberEventParser = (): MemberEventParser => {
|
|||
|
||||
if (content.displayname !== prevContent.displayname) {
|
||||
const prevUserName =
|
||||
prevContent.displayname && typeof prevContent.displayname === 'string'
|
||||
typeof prevContent.displayname === 'string'
|
||||
? prevContent.displayname || getMxIdLocalPart(userId)
|
||||
: getMxIdLocalPart(userId);
|
||||
|
||||
return {
|
||||
icon: Icons.Mention,
|
||||
body:
|
||||
content.displayname && typeof content.displayname === 'string' ? (
|
||||
typeof content.displayname === 'string' ? (
|
||||
<>
|
||||
<b>{prevUserName}</b>
|
||||
{' changed display name to '}
|
||||
|
|
Loading…
Reference in a new issue