fix: lint issues - add braces to case block and prefix unused var

This commit is contained in:
Claude
2026-01-19 21:33:09 +00:00
parent ff54d6b610
commit 00662d7611
2 changed files with 4 additions and 3 deletions

View File

@@ -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
}
}

View File

@@ -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