feat: add support for custom emojis (NIP-30) (#63)

Reviewed-on: reya/coop#63
This commit is contained in:
2026-10-11 13:22:53 +00:00
parent b4ce9368e2
commit 291471075b
16 changed files with 493 additions and 63 deletions
+10 -1
View File
@@ -110,18 +110,27 @@ impl GroupId {
&self,
content: &str,
replies: &[EventId],
emojis: &[Tag],
previous: Option<Tag>,
) -> EventBuilder {
EventBuilder::new(Kind::ChatMessage, content)
.tag(self.h_tag())
.tags(replies.iter().copied().map(Tag::event))
.tags(emojis.iter().cloned())
.tag_maybe(previous)
}
pub fn reaction(&self, target: EventId, emoji: &str, previous: Option<Tag>) -> EventBuilder {
pub fn reaction(
&self,
target: EventId,
emoji: &str,
emojis: &[Tag],
previous: Option<Tag>,
) -> EventBuilder {
EventBuilder::new(Kind::Reaction, emoji)
.tag(self.h_tag())
.tag(Tag::event(target))
.tags(emojis.iter().cloned())
.tag_maybe(previous)
}