Skip to content

Commit

Permalink
chore: fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Sep 18, 2024
1 parent 70cd41e commit 03b0671
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 3 additions & 1 deletion frontend/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@
"Nelson": { "url": "mailto:[email protected]" },
"D@vid": { "url": "mailto:[email protected]" },
"merlinux": { "url": "mailto:[email protected]" },
"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"
}
Expand Down
18 changes: 10 additions & 8 deletions frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (() => {
Expand Down

0 comments on commit 03b0671

Please sign in to comment.