mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-02 08:58:36 +02:00
update NIP-35: use "x" tag instead of "btih".
This commit is contained in:
parent
855692c1b4
commit
da35099d39
@ -22,7 +22,7 @@ export function getTorrentTitle(torrent: NostrEvent) {
|
||||
return title;
|
||||
}
|
||||
export function getTorrentBtih(torrent: NostrEvent) {
|
||||
const btih = torrent.tags.find((a) => a[0] === "btih")?.[1];
|
||||
const btih = torrent.tags.find((a) => a[0] === "btih" || a[0] === "x")?.[1];
|
||||
if (!btih) throw new Error("Missing btih");
|
||||
return btih;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ export default function NewTorrentView() {
|
||||
content: values.description,
|
||||
tags: [
|
||||
["title", values.title],
|
||||
["btih", values.btih],
|
||||
["x", values.btih],
|
||||
...values.tags.map((v) => ["t", v]),
|
||||
...values.files.map((f) => ["file", f.name, String(f.size)]),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user