mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 23:16:50 +02:00
feat: use app name in window titles for NIP-89 app events
Add special handling for kind 31990 (Application Handler) events in getEventDisplayTitle to use the app name from content JSON instead of generic kind name. Falls back to identifier if app name not available. This gives NIP-89 app handler events nice readable window titles.
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
getPullRequestSubject,
|
||||
} from "@/lib/nip34-helpers";
|
||||
import { getCodeName } from "@/lib/nip-c0-helpers";
|
||||
import { getAppName } from "@/lib/nip89-helpers";
|
||||
import { getKindInfo } from "@/constants/kinds";
|
||||
|
||||
/**
|
||||
@@ -48,6 +49,9 @@ export function getEventDisplayTitle(
|
||||
case 1618: // Pull request
|
||||
title = getPullRequestSubject(event);
|
||||
break;
|
||||
case 31990: // Application Handler
|
||||
title = getAppName(event);
|
||||
break;
|
||||
}
|
||||
|
||||
if (title) return title;
|
||||
|
||||
Reference in New Issue
Block a user