feat: include targetEvents in parsedZap
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
e398bf8e82
commit
e65845af6d
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@snort/system-react",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"description": "React hooks for @snort/system",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -16,7 +16,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@snort/shared": "^1.0.9",
|
||||
"@snort/system": "^1.1.3",
|
||||
"@snort/system": "^1.1.4",
|
||||
"react": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@snort/system",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"description": "Snort nostr system package",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -51,6 +51,7 @@ export function parseZap(zapReceipt: NostrEvent): ParsedZap {
|
||||
content: zapRequest.content,
|
||||
errors: [],
|
||||
pollOption: pollOpt ? Number(pollOpt) : undefined,
|
||||
targetEvents: NostrLink.fromTags(zapRequest.tags),
|
||||
};
|
||||
if (findTag(zapRequest, "p") !== findTag(zapReceipt, "p")) {
|
||||
ret.valid = false;
|
||||
@ -75,7 +76,8 @@ export function parseZap(zapReceipt: NostrEvent): ParsedZap {
|
||||
valid: false,
|
||||
anonZap: false,
|
||||
errors: ["invalid zap, parsing failed"],
|
||||
};
|
||||
targetEvents: [],
|
||||
} as ParsedZap;
|
||||
if (!ret.valid) {
|
||||
Log("Invalid zap %O", ret);
|
||||
}
|
||||
@ -96,4 +98,9 @@ export interface ParsedZap {
|
||||
content?: string;
|
||||
sender?: string;
|
||||
pollOption?: number;
|
||||
|
||||
/**
|
||||
* A list of targets this zap is zapping
|
||||
*/
|
||||
targetEvents: Array<NostrLink>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user