feat: NIP-96 server list

This commit is contained in:
2024-05-14 13:16:03 +01:00
parent 7d0d3030f4
commit 5763d91e8a
14 changed files with 192 additions and 72 deletions

View File

@ -62,8 +62,8 @@ export class Nip96Uploader implements Uploader {
?.split("x");
const mime = data.nip94_event.tags.find(a => a[0] === "m")?.at(1) ?? "";
let url = data.nip94_event.tags.find(a => a[0] === "url")?.at(1) ?? "";
if(!url.match(FileExtensionRegex) && mime) {
switch(mime) {
if (!url.match(FileExtensionRegex) && mime) {
switch (mime) {
case "image/webp": {
url += ".webp";
break;