Support NIP-30 custom emoji in messages and reactions
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user