Fix RSVPs to use status tag instead of deprecated generic l tag
This commit is contained in:
parent
d820d33af0
commit
173d5e2bf3
@ -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>
|
||||
|
@ -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: "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user