diff --git a/frontend/data.json b/frontend/data.json index 1de1e2c..f254eb4 100644 --- a/frontend/data.json +++ b/frontend/data.json @@ -239,7 +239,9 @@ "Nelson": { "url": "mailto:nelsonr9608@nauta.cu" }, "D@vid": { "url": "mailto:david@testrun.org" }, "merlinux": { "url": "mailto:delta@merlinux.eu" }, - "FrancyJ2M": { "url": "OPENPGP4FPR:F855EC3AE2AC5448D77C47D381D62284033B80F1#a=devfrancy%40nine.testrun.org&n=FrancyJ2M&i=bCZJkxDRVxP&s=XmSFm50FXNE" }, + "FrancyJ2M": { + "url": "OPENPGP4FPR:F855EC3AE2AC5448D77C47D381D62284033B80F1#a=devfrancy%40nine.testrun.org&n=FrancyJ2M&i=bCZJkxDRVxP&s=XmSFm50FXNE" + }, "adbenitez": { "url": "OPENPGP4FPR:F2175B65C599D9AB58FDBE35A1D2B46E62A29658#a=friendscaaj3%40testrun.org&n=adb&i=_vLu0fUI53k&s=teNGaPzemPW" } diff --git a/frontend/src/store.ts b/frontend/src/store.ts index 2c477c2..ee3f5e2 100644 --- a/frontend/src/store.ts +++ b/frontend/src/store.ts @@ -8,18 +8,20 @@ function isOnline(lastSync: Date, lastSeen?: Date): boolean { return timeAgo <= recently; } -function getInviteLink(string uri): string { - if (uri.startsWith('https://i.delta.chat')) { +function getInviteLink(uri: string): string { + if (uri.startsWith("https://i.delta.chat")) { return uri; } - return 'https://i.delta.chat/#' + uri.replace(/openpgp4fpr:/i, '').replace('#', '&'); + uri = uri.replace(/openpgp4fpr:/i, "").replace("#", "&"); + return "https://i.delta.chat/#" + uri; } -function getQrData(string uri): string { - if (uri.startsWith('https://i.delta.chat')) { - return 'openpgp4fpr:' + uri.replace(/https:\/\/i.delta.chat\/?#/, '').replace(/&/, '#'); - } - return uri; +function getQrData(uri: string): string { + if (uri.startsWith("https://i.delta.chat")) { + uri = uri.replace(/https:\/\/i.delta.chat\/?#/, "").replace(/&/, "#"); + return "openpgp4fpr:" + uri; + } + return uri; } export const api = (() => {