add frontend interface to send reactions

This commit is contained in:
marlon-erler
2026-04-07 18:39:55 +00:00
parent 1c74484644
commit ad978807dc
7 changed files with 349 additions and 39 deletions
+10 -4
View File
@@ -214,7 +214,7 @@ export default class ChatModel {
sendReaction = async (
messageId: string,
content: ReactionSymbol,
content: ReactionSymbols,
): Promise<void> => {
const nameAndChannel = this.getNameAndChannel();
if (nameAndChannel == false) return;
@@ -407,7 +407,7 @@ export default class ChatModel {
static createMessageReaction = (
messageId: string,
sender: string,
content: ReactionSymbol,
content: ReactionSymbols,
): ChatMessageReaction => {
const fileContent = FileModel.createFileContent(v4(), "reaction");
const reaction: ChatMessageReaction = {
@@ -422,7 +422,13 @@ export default class ChatModel {
}
// types
export type ReactionSymbol = "👍" | "✅" | "❗️" | "‼️" | "❓";
export enum ReactionSymbols {
ThumbsUp = "👍",
Check = "✅",
Attention = "❗️",
DoubleAttention = "‼️",
Question = "❓",
}
export interface ChatInfo extends ValidObject {
primaryChannel: string;
@@ -456,7 +462,7 @@ export interface ChatMessageReaction
extends ValidObject, FileContent<"reaction"> {
messageId: string;
sender: string;
content: ReactionSymbol | string;
content: ReactionSymbols | string;
}
// references