sendReaction method

Future<String?> sendReaction(
  1. String eventId,
  2. String key, {
  3. String? txid,
})

Sends a reaction to an event with an eventId and the content key into a room. Returns the event ID generated by the server for this reaction.

Implementation

Future<String?> sendReaction(String eventId, String key, {String? txid}) {
  return sendEvent({
    'm.relates_to': {
      'rel_type': RelationshipTypes.reaction,
      'event_id': eventId,
      'key': key,
    },
  }, type: EventTypes.Reaction, txid: txid);
}