This commit is contained in:
Henry Jameson 2026-08-04 18:04:57 +03:00
commit 95bbe73832
19 changed files with 38 additions and 58 deletions

View file

@ -12,9 +12,7 @@ export const maybeShowChatNotification = (chat) => {
body: chat.lastMessage.content,
}
if (
chat.lastMessage.attachment?.type === 'image'
) {
if (chat.lastMessage.attachment?.type === 'image') {
opts.image = chat.lastMessage.attachment.preview_url
}

View file

@ -175,10 +175,7 @@ export const prepareNotificationObject = (notification, i18n) => {
}
// Shows first attached non-nsfw image, if any. Should add configuration for this somehow...
if (
!status.nsfw &&
status?.attachments?.[0]?.mimetype.startsWith('image/')
) {
if (!status.nsfw && status?.attachments?.[0]?.mimetype.startsWith('image/')) {
notifObj.image = status.attachments[0].url
}

View file

@ -1,7 +1,9 @@
/* global process */
function urlBase64ToUint8Array(base64String) {
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
const base64 = (base64String + padding).replaceAll('-', '+').replace(/_/g, '/')
const base64 = (base64String + padding)
.replaceAll('-', '+')
.replace(/_/g, '/')
const rawData = window.atob(base64)
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))

View file

@ -244,10 +244,7 @@ export const OPACITIES = Object.entries(SLOT_INHERITANCE).reduce((acc, [k]) => {
...acc,
[opacity]: {
defaultValue: DEFAULT_OPACITY[opacity] || 1,
affectedSlots: [
...((acc[opacity]?.affectedSlots) || []),
k,
],
affectedSlots: [...(acc[opacity]?.affectedSlots || []), k],
},
}
} else {