Skip to content

Commit

Permalink
masto profiles automatically load nostr bridged ones when using a nos…
Browse files Browse the repository at this point in the history
…tr account
  • Loading branch information
ghobs91 committed Mar 25, 2024
1 parent fec0735 commit 7402935
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/account-block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function AccountBlock({

const verifiedField = fields?.find((f) => !!f.verifiedAt && !!f.value);



return (
<a
class="account-block"
Expand All @@ -78,7 +80,7 @@ function AccountBlock({
const userId = url.split("users/")[1]
const dittoProfileCall = await fetch(`https://ditto.pub/api/v1/accounts/${userId}`, {method: "get"});
const dittoProfileCallResponse = await dittoProfileCall.json();
if (dittoProfileCallResponse.length) {
if (dittoProfileCallResponse) {
location.hash = url.replace("https:/", "").replace("users", "a");
} else {
location.hash = `/${instance}/a/${id}`;
Expand Down

0 comments on commit 7402935

Please sign in to comment.