forked from Henry-Hiles/nexus
make mention optional for replies
This commit is contained in:
parent
263ad5ab4a
commit
eaebea4d44
4 changed files with 26 additions and 2 deletions
|
|
@ -230,6 +230,7 @@ class RoomChatController extends AsyncNotifier<ChatController> {
|
|||
|
||||
Future<void> send(
|
||||
String message, {
|
||||
bool shouldMention = true,
|
||||
required Iterable<Tag> tags,
|
||||
required RelationType relationType,
|
||||
Message? relation,
|
||||
|
|
@ -252,7 +253,9 @@ class RoomChatController extends AsyncNotifier<ChatController> {
|
|||
roomId: roomId,
|
||||
mentions: Mentions(
|
||||
userIds: [
|
||||
if (relation != null && relationType == RelationType.reply)
|
||||
if (shouldMention == true &&
|
||||
relation != null &&
|
||||
relationType == RelationType.reply)
|
||||
relation.authorId,
|
||||
].toIList(),
|
||||
room: taggedMessage.contains("@room"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue