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 (rsvpEvent) {
const rsvpResponse = getTagValues("l", rsvpEvent.tags);
const rsvpResponse = getTagValues("status", rsvpEvent.tags);
const rsvpResponseDeprecated = getTagValues("l", rsvpEvent.tags);
return (
<div className="flex items-center gap-2">
<Button disabled>
{rsvpResponse === "accepted"
{rsvpResponse === "accepted" || rsvpResponseDeprecated === "accepted"
? "Going"
: rsvpResponse === "tentative"
: rsvpResponse === "tentative" || rsvpResponseDeprecated === "tentative"
? "Tentative"
: "Not Going"}
</Button>

View File

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