bsky stuff now works as intended

This commit is contained in:
CatAClock 2025-05-11 19:39:38 -07:00
parent 73472ab227
commit a412ed531c

View file

@ -60,7 +60,7 @@ async function GetPost() {
}
// Update the post to see if there is new information.
post = await MastodonAPI.GetStatus(post.id);
// Set the texts.
// Set the texts. It's opposite because "setting" causes it to switch.
FavoriteFlipper = !(post.favourite);
BoostFlipper = !(post.reblogged);
SetFavorite();
@ -81,8 +81,17 @@ async function GetPost() {
}
}
// We don't need to update the post with new information. The repos are seperate.
// Set the texts.
// TODO!
// Set the texts. It's opposite because "setting" causes it to switch.
let GetRepo = await BlueskyAPI.GetRecord(localStorage.getItem(Variables.BlueskyDID), "app.bsky.feed.like", post.post.uri.split("/")[post.post.uri.split("/").length - 1]);
if (GetRepo.hasOwnProperty("error") && GetRepo.error == "RecordNotFound") {
FavoriteFlipper = true;
}
GetRepo = await BlueskyAPI.GetRecord(localStorage.getItem(Variables.BlueskyDID), "app.bsky.feed.repost", post.post.uri.split("/")[post.post.uri.split("/").length - 1]);
if (GetRepo.hasOwnProperty("error") && GetRepo.error == "RecordNotFound") {
BoostFlipper = true;
}
SetFavorite();
SetBoost();
} else {
document.getElementsByClassName("PostText")[0].innerHTML = "Nothing to load.";
}