improve displayname handling
This commit is contained in:
parent
8b2bff9415
commit
26b8e99a90
1 changed files with 3 additions and 1 deletions
|
|
@ -70,7 +70,9 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
"body": newContent?["body"] ?? content["body"],
|
"body": newContent?["body"] ?? content["body"],
|
||||||
"eventType": type,
|
"eventType": type,
|
||||||
"avatarUrl": author?.content["avatar_url"],
|
"avatarUrl": author?.content["avatar_url"],
|
||||||
"displayName": author?.content["displayname"] ?? event.authorId,
|
"displayName": author?.content["displayname"]?.isNotEmpty == true
|
||||||
|
? author?.content["displayname"]
|
||||||
|
: event.authorId.substring(1).split(":")[0],
|
||||||
"txnId": config.event.transactionId,
|
"txnId": config.event.transactionId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue