fixed
This commit is contained in:
parent
2401f9b958
commit
a0bd84d844
1 changed files with 12 additions and 4 deletions
|
@ -30,11 +30,15 @@ Favorite.onclick = (event) => {
|
|||
if (Favoritable == false) {
|
||||
return;
|
||||
}
|
||||
Favoritee();
|
||||
}
|
||||
|
||||
async function Favoritee() {
|
||||
Favoritable = false;
|
||||
if (website == "Mastodon") {
|
||||
MastodonAPI.CreateFavorite(post.id, post.favourited);
|
||||
await MastodonAPI.CreateFavorite(post.id, post.favourited);
|
||||
} else if (website == "Bluesky") {
|
||||
BlueskyAPI.CreateLike(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
||||
await BlueskyAPI.CreateLike(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
||||
}
|
||||
SetFavorite();
|
||||
}
|
||||
|
@ -43,11 +47,15 @@ Boost.onclick = (event) => {
|
|||
if (Boostable == false) {
|
||||
return;
|
||||
}
|
||||
Boostee();
|
||||
}
|
||||
|
||||
async function Boostee() {
|
||||
Boostable = false;
|
||||
if (website == "Mastodon") {
|
||||
MastodonAPI.CreateReblog(post.id, post.reblogged);
|
||||
await MastodonAPI.CreateReblog(post.id, post.reblogged);
|
||||
} else if (website == "Bluesky") {
|
||||
BlueskyAPI.CreateRepost(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
||||
await BlueskyAPI.CreateRepost(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
||||
}
|
||||
SetBoost();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue