Fix RSVPs to use status tag instead of deprecated generic l tag

This commit is contained in:
Terry Yiu 2024-08-16 10:55:36 -04:00
parent d820d33af0
commit 173d5e2bf3
No known key found for this signature in database
GPG Key ID: 108645AE8A19B71A
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: "",