sendChannelMessage static method

Event sendChannelMessage(
  1. String channelId,
  2. String content,
  3. String privkey, {
  4. String? relay,
  5. List<ETag>? etags,
  6. List<PTag>? ptags,
})

Implementation

static Event sendChannelMessage(
    String channelId, String content, String privkey,
    {String? relay, List<ETag>? etags, List<PTag>? ptags}) {
  Thread thread =
      Thread(Nip10.rootTag(channelId, relay ?? ''), etags ?? [], ptags ?? []);
  return Event.from(
    kind: 42,
    tags: Nip10.toTags(thread),
    content: content,
    privkey: privkey,
  );
}