broadcastReaction method
convenience methods
broadcast a reaction to an event
eventId
the event you want to react to
customRelays
relay URls to send the deletion request to specific relays
reaction
the reaction, default + (like) can be 🤔 (emoji)
Implementation
/// broadcast a reaction to an event \
/// [eventId] the event you want to react to \
/// [customRelays] relay URls to send the deletion request to specific relays \
/// [reaction] the reaction, default + (like) can be 🤔 (emoji)
NdkBroadcastResponse broadcastReaction({
required String eventId,
Iterable<String>? customRelays,
String reaction = "+",
}) {
final signer = _checkSinger();
Nip01Event event = Nip01Event(
pubKey: signer.getPublicKey(),
kind: Reaction.KIND,
tags: [
["e", eventId]
],
content: reaction,
createdAt: DateTime.now().millisecondsSinceEpoch ~/ 1000);
return broadcast(nostrEvent: event, specificRelays: customRelays);
}