feat(reactions): dont double send reaction
This commit is contained in:
parent
0a5f77e413
commit
1f001eb144
1 changed files with 5 additions and 3 deletions
|
|
@ -1541,9 +1541,11 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
// setState(() => selectedEvents.clear());
|
||||
// Pangea#
|
||||
// if reaction already exists, don't send it again
|
||||
if (_allReactionEvents.any(
|
||||
(e) => e.content.tryGetMap('m.relates_to')?['key'] == emoji,
|
||||
)) {
|
||||
if (timeline == null ||
|
||||
events.any(
|
||||
(e) => e.aggregatedEvents(timeline!, RelationshipTypes.reaction).any(
|
||||
(re) => re.content.tryGetMap('m.relates_to')?['key'] == emoji),
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue