add: custom emojis

fix: don't show reposts of posts from blocked users
fix: don't show questions when they're from users you've blocked
This commit is contained in:
trisua 2025-05-10 21:58:02 -04:00
parent 9f187039e6
commit 275dd0a1eb
25 changed files with 697 additions and 61 deletions

View file

@ -24,6 +24,9 @@
res.message,
]);
delete self.LOGIN_ACCOUNT_TOKENS[res.payload];
self.set_login_account_tokens(self.LOGIN_ACCOUNT_TOKENS);
if (res.ok) {
setTimeout(() => {
window.location.href = "/";
@ -345,6 +348,26 @@
}
});
self.define("emojis", async () => {
const payload = (await (await fetch("/api/v1/my_emojis")).json())
.payload;
const out = [];
for (const [community, [category, emojis]] of Object.entries(payload)) {
for (const emoji of emojis) {
out.push({
category,
name: emoji.name,
shortcodes: [`${community}.${emoji.name}`],
url: `/api/v1/communities/${community}/emojis/${emoji.name}`,
});
}
}
return out;
});
// token switcher
self.define(
"set_login_account_tokens",