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:
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user