fix: improve feedback type parsing from custom IDs and add validation for feedback types in interaction and view logic.
This commit is contained in:
@@ -94,6 +94,12 @@ export function buildFeedbackMessage(feedback: FeedbackData) {
|
||||
};
|
||||
|
||||
const theme = themes[feedback.type];
|
||||
|
||||
if (!theme) {
|
||||
console.error(`Unknown feedback type: ${feedback.type}`);
|
||||
throw new Error(`Invalid feedback type: ${feedback.type}`);
|
||||
}
|
||||
|
||||
const timestamp = Math.floor(feedback.timestamp.getTime() / 1000);
|
||||
|
||||
// Header Container
|
||||
|
||||
Reference in New Issue
Block a user