Merge pull request #16 from tyiu/nip52-updates

Fix RSVPs to use status tag instead of deprecated generic l tag
This commit is contained in:
zmeyer44 2024-10-11 12:09:04 -04:00 committed by GitHub
commit b2dfaa18d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -88,13 +88,14 @@ export default function RSVPButton({ event }: RSVPButtonProps) {
if (!tickets) { if (!tickets) {
if (rsvpEvent) { if (rsvpEvent) {
const rsvpResponse = getTagValues("l", rsvpEvent.tags); const rsvpResponse = getTagValues("status", rsvpEvent.tags);
const rsvpResponseDeprecated = getTagValues("l", rsvpEvent.tags);
return ( return (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Button disabled> <Button disabled>
{rsvpResponse === "accepted" {rsvpResponse === "accepted" || rsvpResponseDeprecated === "accepted"
? "Going" ? "Going"
: rsvpResponse === "tentative" : rsvpResponse === "tentative" || rsvpResponseDeprecated === "tentative"
? "Tentative" ? "Tentative"
: "Not Going"} : "Not Going"}
</Button> </Button>

View File

@ -41,8 +41,7 @@ export default function RSVPModal({ eventReference }: RSVPModalProps) {
const tags: string[][] = [ const tags: string[][] = [
["d", random], ["d", random],
["a", eventReference], ["a", eventReference],
["L", "status"], ["status", statusMap[type]],
["l", statusMap[type], "status"],
]; ];
const event = await createEvent(ndk, { const event = await createEvent(ndk, {
content: "", content: "",