Support NIP-30 custom emoji in messages and reactions

This commit is contained in:
2026-10-11 16:43:51 +07:00
parent 8a043b8d49
commit 6dad27469d
8 changed files with 250 additions and 30 deletions
+9 -1
View File
@@ -886,7 +886,15 @@ impl GroupPanel {
let content = self
.rendered_texts_by_id
.entry(message.id)
.or_insert_with(|| rendered_text(&message.content, &message.mentions, &persons, cx))
.or_insert_with(|| {
rendered_text(
&message.content,
&message.mentions,
&message.emojis,
&persons,
cx,
)
})
.element(ix.into(), window, cx);
let admin = nostr
+7 -3
View File
@@ -43,9 +43,13 @@ pub(crate) fn render(
let author = persons.read(cx).get(&message.author, cx);
let reaction_groups = group_reactions(
reactions
.iter()
.map(|reaction| (SharedString::from(reaction.emoji.as_str()), reaction.author)),
reactions.iter().map(|reaction| {
(
SharedString::from(reaction.emoji.as_str()),
reaction.image.clone(),
reaction.author,
)
}),
nostr.read(cx).current_user(),
);