diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c3f0d3..bd8e2d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.26.2 +* Fixed a few cases where high-quality portraits were not displayed + ## 1.26.1 * Added [high-quality portrait guide](https://github.com/hearmeneigh/fchat-rising/wiki/High%E2%80%90Quality-Portraits) * Added high-quality portrait check to Profile Helper diff --git a/fchat/characters.ts b/fchat/characters.ts index 86e41e9..43c30aa 100644 --- a/fchat/characters.ts +++ b/fchat/characters.ts @@ -3,6 +3,7 @@ import { methods } from '../site/character_page/data_store'; import {decodeHTML} from './common'; import {Character as Interfaces, Connection} from './interfaces'; import { Character as CharacterProfile } from '../site/character_page/interfaces'; +import Vue from 'vue'; class Character implements Interfaces.Character { gender: Interfaces.Gender = 'None'; @@ -68,7 +69,8 @@ class State implements Interfaces.State { setOverride(name: string, type: 'status', value: Interfaces.Status | undefined): void; setOverride(name: string, type: keyof CharacterOverrides, value: any): void { const char = this.get(name); - char.overrides[type] = value; + + Vue.set(char.overrides, type, value); } async resolveOwnProfile(): Promise { diff --git a/learn/yiffbot.ts b/learn/yiffbot.ts index b74ff93..9488ec2 100644 --- a/learn/yiffbot.ts +++ b/learn/yiffbot.ts @@ -1,6 +1,8 @@ +import _ from 'lodash'; import { EventBus } from '../chat/preview/event-bus'; import { Message } from '../chat/common'; import core from '../chat/core'; +import Vue from 'vue'; export function initYiffbot4000Integration() { EventBus.$on('private-message', ({ message }: { message: Message }) => { @@ -14,8 +16,8 @@ export function initYiffbot4000Integration() { if (manifest.type === 'FChatRisingBotManifest' && manifest.version >= 1) { const char = core.characters.get('YiffBot 4000'); - char.overrides.avatarUrl = manifest.avatarUrl; - char.overrides.gender = manifest.gender; + Vue.set(char.overrides, 'avatarUrl', manifest.avatarUrl); + Vue.set(char.overrides, 'gender', _.get(manifest, 'assistant.gender')); } } catch (err) { console.error('FChatRisingBotManifest.error', err);