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:
commit
b2dfaa18d1
@ -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>
|
||||||
|
@ -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: "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user