diff --git a/src/app/components/ReactionSummary.svelte b/src/app/components/ReactionSummary.svelte index d1fb220c..8c95edfb 100644 --- a/src/app/components/ReactionSummary.svelte +++ b/src/app/components/ReactionSummary.svelte @@ -3,7 +3,8 @@ import {groupBy, uniqBy} from "@welshman/lib" import {REACTION} from "@welshman/util" import {deriveEvents} from "@welshman/store" - import {pubkey, repository, load} from "@welshman/app" + import {pubkey, repository, load, displayProfileByPubkey} from "@welshman/app" + import {displayList} from "@lib/util" import {displayReaction} from "@app/state" export let event @@ -26,11 +27,15 @@ {#if $reactions.length > 0}
{#each groupedReactions.entries() as [content, events]} - {@const isOwn = events.some(e => e.pubkey === $pubkey)} + {@const pubkeys = events.map(e => e.pubkey)} + {@const isOwn = $pubkey && pubkeys.includes($pubkey)} + {@const info = displayList(pubkeys.map(pubkey => displayProfileByPubkey(pubkey)))} + {@const tooltip = `${info} reacted ${displayReaction(content)}`} {@const onClick = () => onReactionClick(content, events)}