+ {Array.from(reactions).map(([reaction, { count, clicked }]) => {
+ return (
+
+
{reaction}
+ {count > 1 &&
{` ${count}`}
}
+
+ );
+ })}
+
+ )
+ : null
+ );
+}
diff --git a/app/UI/message-panel.tsx b/app/UI/message-panel.tsx
index dfa8168..b6d679a 100644
--- a/app/UI/message-panel.tsx
+++ b/app/UI/message-panel.tsx
@@ -26,6 +26,7 @@ import { BlockUser, UnblockUser } from "./user-detail.tsx";
import {
DeleteEvent,
func_GetEventByID,
+ func_GetReactionsByEventID,
func_IsAdmin,
MessageList,
ReplyToMessage,
@@ -75,6 +76,7 @@ interface MessagePanelProps {
isUserBlocked: (pubkey: PublicKey) => boolean;
getEventByID: func_GetEventByID;
isAdmin: func_IsAdmin | undefined;
+ getReactionsByEventID: func_GetReactionsByEventID;
};
}
diff --git a/app/UI/public-message-container.tsx b/app/UI/public-message-container.tsx
index 663a573..16f5583 100644
--- a/app/UI/public-message-container.tsx
+++ b/app/UI/public-message-container.tsx
@@ -13,7 +13,7 @@ import { NostrAccountContext } from "../../libs/nostr.ts/nostr.ts";
import { MessagePanel } from "./message-panel.tsx";
import { PublicKey } from "../../libs/nostr.ts/key.ts";
import { ChatMessage } from "./message.ts";
-import { func_GetEventByID, func_IsAdmin } from "./message-list.tsx";
+import { func_GetEventByID, func_GetReactionsByEventID, func_IsAdmin } from "./message-list.tsx";
import { Filter, FilterContent } from "./filter.tsx";
import { NoteID } from "../../libs/nostr.ts/nip19.ts";
@@ -38,6 +38,7 @@ type Props = {
isUserBlocked: func_IsUserBlocked;
getEventByID: func_GetEventByID;
isAdmin: func_IsAdmin | undefined;
+ getReactionsByEventID: func_GetReactionsByEventID;
};
} & Public_Model;
diff --git a/app/database.ts b/app/database.ts
index e1fa096..54fc38a 100644
--- a/app/database.ts
+++ b/app/database.ts
@@ -66,6 +66,11 @@ export class Database_View implements ProfileSetter, ProfileGetter, EventRemover
private readonly caster = csp.multi<{ event: Parsed_Event; relay?: string }>(this.sourceOfChange);
private readonly profiles = new Map