getOkCommandCallBack method

void Function(String relay, NostrEventOkCommand ok)? getOkCommandCallBack({
  1. required String associatedEventIdWithOkCommand,
  2. required String relay,
})

Returns an ok command callback from the registry with the given associatedEventId.

Implementation

void Function(
  String relay,
  NostrEventOkCommand ok,
)? getOkCommandCallBack({
  required String associatedEventIdWithOkCommand,
  required String relay,
}) {
  final relayOkRegister = getOrCreateRegister(okCommandCallBacks, relay);

  return relayOkRegister[associatedEventIdWithOkCommand];
}