1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

Merge pull request #1300 from cfinegan/master

getEmoteSuggestions no longer uses stale channel info
This commit is contained in:
Mike 2022-12-07 12:46:13 -05:00 committed by GitHub
commit 764cacd354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -942,18 +942,18 @@ export default class Input extends Module {
getEmoteSuggestions(input, inst) {
if ( ! inst._ffz_channel_login ) {
const parent = this.fine.searchParent(inst, 'chat-input', 50);
if ( parent )
this.updateEmoteCompletion(parent, inst);
}
const user = inst._ffz_user,
channel_id = inst._ffz_channel_id,
channel_login = inst._ffz_channel_login;
if ( ! channel_login ) {
const parent = this.fine.searchParent(inst, 'chat-input', 50);
if ( parent )
this.updateEmoteCompletion(parent, inst);
if ( ! channel_login )
return [];
}
if ( ! channel_login )
return [];
let cache = inst.ffz_ffz_cache;
if ( ! cache || cache.user_id !== user?.id || cache.user_login !== user?.login || cache.channel_id !== channel_id || cache.channel_login !== channel_login )