Compare commits
1 commit
8946353228
...
4ab180c211
| Author | SHA1 | Date | |
|---|---|---|---|
|
4ab180c211 |
2 changed files with 11 additions and 6 deletions
|
|
@ -86,7 +86,8 @@ class RoomChatController extends AsyncNotifier<ChatController> {
|
|||
await client.getRoomState(
|
||||
GetRoomStateRequest(
|
||||
roomId: roomId,
|
||||
fetchMembers: room.metadata?.hasMemberList == false,
|
||||
fetchMembers: true,
|
||||
includeMembers: false,
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -182,9 +183,7 @@ class RoomChatController extends AsyncNotifier<ChatController> {
|
|||
|
||||
taggedMessage = taggedMessage.replaceAllMapped(
|
||||
pattern,
|
||||
(match) => match.group(
|
||||
1,
|
||||
)!, // TODO: Return an HTML or Markdown link from here, not plaintext
|
||||
(match) => match.group(1)!,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +191,13 @@ class RoomChatController extends AsyncNotifier<ChatController> {
|
|||
client.sendMessage(
|
||||
SendMessageRequest(
|
||||
roomId: roomId,
|
||||
mentions: Mentions(), // TODO: Add parsed mentions
|
||||
mentions: Mentions(
|
||||
userIds: [
|
||||
if (relation != null && relationType == RelationType.reply)
|
||||
relation.authorId,
|
||||
].toIList(),
|
||||
room: taggedMessage.contains("@room"),
|
||||
), // TODO: Add parsed mentions
|
||||
text: taggedMessage,
|
||||
relation: relation == null
|
||||
? null
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class MentionOverlay extends ConsumerWidget {
|
|||
member.authorId,
|
||||
),
|
||||
onTap: () => addTag(
|
||||
id: member.authorId,
|
||||
id: "[@${member.content["displayname"]}](https://matrix.to/#/${member.authorId})",
|
||||
name: member.authorId
|
||||
.substring(1)
|
||||
.split(":")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue