web/statestore: ignore packs with no images

This commit is contained in:
Tulir Asokan 2024-10-26 16:30:17 +03:00
parent d9d0718bc6
commit 64f9fccfd7
2 changed files with 2 additions and 2 deletions

View file

@ -206,7 +206,7 @@ export class StateStore {
getPersonalEmojiPack(): CustomEmojiPack | null {
if (this.#personalEmojiPack === null) {
const pack = this.accountData.get("im.ponies.user_emotes")
if (!pack) {
if (!pack || !pack.images) {
return null
}
this.#personalEmojiPack = parseCustomEmojiPack(pack as ImagePack, "personal", "Personal pack")

View file

@ -120,7 +120,7 @@ export class RoomStateStore {
getEmojiPack(key: string): CustomEmojiPack | null {
if (!this.emojiPacks.has(key)) {
const pack = this.getStateEvent("im.ponies.room_emotes", key)?.content
if (!pack) {
if (!pack || !pack.images) {
this.emojiPacks.set(key, null)
return null
}