mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-05 10:11:12 +02:00
fix: lint issues - add braces to case block and prefix unused var
This commit is contained in:
@@ -58,7 +58,7 @@ export function parseChatCommand(args: string[]): ChatCommandResult {
|
||||
adapter: null, // No adapter needed for group list view
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
// Not a valid naddr, continue to adapter parsing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,12 +90,13 @@ export function getRootEventTitle(event: NostrEvent): string {
|
||||
return getTagValue(event, "title") || "Live Activity";
|
||||
case 30024: // Draft long-form article
|
||||
return getArticleTitle(event) || "Draft Article";
|
||||
case 1: // Note
|
||||
// Take first line or first 50 chars
|
||||
case 1: {
|
||||
// Note - Take first line or first 50 chars
|
||||
const firstLine = event.content.split("\n")[0];
|
||||
return firstLine.length > 50
|
||||
? firstLine.slice(0, 50).trim() + "..."
|
||||
: firstLine.trim() || "Note";
|
||||
}
|
||||
case 30078: // Application-specific data
|
||||
return getTagValue(event, "d") || "Application Data";
|
||||
case 30040: // Video event
|
||||
|
||||
Reference in New Issue
Block a user