diff --git a/src/components/status.jsx b/src/components/status.jsx index b1b1621d..a85ad1ed 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -59,7 +59,9 @@ function Status({ ); } - const { masto, instance, authenticated } = api({ instance: propInstance }); + const { masto, instance } = api({ instance: propInstance }); + const { instance: currentInstance } = api(); + const sameInstance = instance === currentInstance; const sKey = statusKey(statusID, instance); const snapStates = useSnapshot(states); @@ -380,7 +382,7 @@ function Status({ { states.statuses[sKey].poll = newPoll; }} @@ -509,7 +511,7 @@ function Status({ icon="comment" count={repliesCount} onClick={() => { - if (!authenticated) { + if (!sameInstance) { return alert(unauthInteractionErrorMessage); } states.showCompose = { @@ -529,7 +531,7 @@ function Status({ icon="rocket" count={reblogsCount} onClick={async () => { - if (!authenticated) { + if (!sameInstance) { return alert(unauthInteractionErrorMessage); } try { @@ -572,7 +574,7 @@ function Status({ icon="heart" count={favouritesCount} onClick={async () => { - if (!authenticated) { + if (!sameInstance) { return alert(unauthInteractionErrorMessage); } try { @@ -608,7 +610,7 @@ function Status({ class="bookmark-button" icon="bookmark" onClick={async () => { - if (!authenticated) { + if (!sameInstance) { return alert(unauthInteractionErrorMessage); } try {