feat: add forwarding & reply detection with frontend indicators

- Enhanced messageMetadata to capture referenced message content
- Added reply indicator (↩️ Replying to @username + content snippet)
- Added forward badge (🔁 Forwarded) and crosspost badge (📢 Crossposted)
- Frontend auto-fetches referenced message content when metadata is empty
- Added getMessageById API helper
This commit is contained in:
MythEclipse
2026-06-21 18:22:27 +07:00
parent 752d144dc0
commit 21b818a344
4 changed files with 147 additions and 6 deletions
@@ -166,6 +166,12 @@ export function reanalyzeMessage(id: string): Promise<void> {
return request<void>(`/api/messages/${id}/reanalyze`, { method: "POST" });
}
export function getMessageById(
id: string,
): Promise<MessageRecord | null> {
return request<MessageRecord | null>(`/api/messages/detail/${id}`);
}
export function reanalyzeErrorBatch(opts: {
guildId?: string;
channelId?: string;
+10
View File
@@ -27,6 +27,16 @@ export interface MessageMetadata {
threadId?: string;
threadName?: string;
};
reference?: {
messageId: string | null;
channelId: string | null;
guildId: string | null;
type: string | null;
content: string | null;
repliedUsername: string | null;
repliedUserId: string | null;
} | null;
isCrosspost?: boolean;
}
export function parseMetadata(value: string | null): MessageMetadata {