mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-02 16:08:31 +00:00
4.55.1
* Fixed: Link Cards always opening regardless of the setting. Sorry about that, some code got deleted in a refactor and I didn't notice.
This commit is contained in:
parent
98e5373e9a
commit
29419eee22
6 changed files with 10 additions and 35 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.55.0",
|
"version": "4.55.1",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|
|
@ -13,6 +13,7 @@ import SettingsManager from './settings/index';
|
||||||
import AddonManager from './addons';
|
import AddonManager from './addons';
|
||||||
import ExperimentManager from './experiments';
|
import ExperimentManager from './experiments';
|
||||||
import {TranslationManager} from './i18n';
|
import {TranslationManager} from './i18n';
|
||||||
|
import PubSubClient from './pubsub';
|
||||||
import StagingSelector from './staging';
|
import StagingSelector from './staging';
|
||||||
import LoadTracker from './load_tracker';
|
import LoadTracker from './load_tracker';
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ class FrankerFaceZ extends Module {
|
||||||
this.inject('i18n', TranslationManager);
|
this.inject('i18n', TranslationManager);
|
||||||
this.inject('staging', StagingSelector);
|
this.inject('staging', StagingSelector);
|
||||||
this.inject('load_tracker', LoadTracker);
|
this.inject('load_tracker', LoadTracker);
|
||||||
|
this.inject('pubsub', PubSubClient);
|
||||||
this.inject('site', Site);
|
this.inject('site', Site);
|
||||||
this.inject('addons', AddonManager);
|
this.inject('addons', AddonManager);
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
"name": "MQTT-Based PubSub",
|
"name": "MQTT-Based PubSub",
|
||||||
"description": "An experimental new pubsub system that should be more reliable than the existing socket cluster.",
|
"description": "An experimental new pubsub system that should be more reliable than the existing socket cluster.",
|
||||||
"groups": [
|
"groups": [
|
||||||
{"value": true, "weight": 50},
|
{"value": true, "weight": 25},
|
||||||
{"value": false, "weight": 50}
|
{"value": false, "weight": 75}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -54,8 +54,10 @@ export default class LinkCard extends Module {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClick(evt) {
|
handleClick(evt) {
|
||||||
evt.preventDefault();
|
if ( ! this.settings.get('link-cards.enable') )
|
||||||
|
return;
|
||||||
|
|
||||||
|
evt.preventDefault();
|
||||||
this.openCard(evt.url, evt.source);
|
this.openCard(evt.url, evt.source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import AddonManager from './addons';
|
||||||
import ExperimentManager from './experiments';
|
import ExperimentManager from './experiments';
|
||||||
import {TranslationManager} from './i18n';
|
import {TranslationManager} from './i18n';
|
||||||
import StagingSelector from './staging';
|
import StagingSelector from './staging';
|
||||||
|
import PubSubClient from './pubsub';
|
||||||
import LoadTracker from './load_tracker';
|
import LoadTracker from './load_tracker';
|
||||||
import Site from './sites/player';
|
import Site from './sites/player';
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ class FrankerFaceZ extends Module {
|
||||||
this.inject('i18n', TranslationManager);
|
this.inject('i18n', TranslationManager);
|
||||||
this.inject('staging', StagingSelector);
|
this.inject('staging', StagingSelector);
|
||||||
this.inject('load_tracker', LoadTracker);
|
this.inject('load_tracker', LoadTracker);
|
||||||
|
this.inject('pubsub', PubSubClient);
|
||||||
this.inject('site', Site);
|
this.inject('site', Site);
|
||||||
this.inject('addons', AddonManager);
|
this.inject('addons', AddonManager);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ export const State = {
|
||||||
CONNECTED: 2
|
CONNECTED: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
const decoder = new TextDecoder();
|
|
||||||
|
|
||||||
export default class PubSubClient extends Module {
|
export default class PubSubClient extends Module {
|
||||||
constructor(...args) {
|
constructor(...args) {
|
||||||
|
@ -186,36 +185,6 @@ export default class PubSubClient extends Module {
|
||||||
this.emit(`socket:command:${data.cmd}`, data.data, data);
|
this.emit(`socket:command:${data.cmd}`, data.data, data);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*client.on('connect', () => {
|
|
||||||
this._state = State.CONNECTED;
|
|
||||||
});
|
|
||||||
|
|
||||||
client.on('message', (topic, message, packet) => {
|
|
||||||
let data;
|
|
||||||
try {
|
|
||||||
message = decoder.decode(message);
|
|
||||||
data = JSON.parse(message);
|
|
||||||
} catch(err) {
|
|
||||||
this.log.warn(`Error decoding PubSub message on topic "${topic}":`, err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! data.cmd ) {
|
|
||||||
this.log.warn(`Received invalid PubSub message on topic "${topic}":`, data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
data.topic = topic;
|
|
||||||
|
|
||||||
this.log.debug(`Received command on topic "${topic}" for command "${data.cmd}":`, data.data);
|
|
||||||
this.emit(`socket:command:${data.cmd}`, data.data, data);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
client.on('close', () => {
|
|
||||||
this._state = State.CONNECTING;
|
|
||||||
});*/
|
|
||||||
|
|
||||||
// Subscribe to topics.
|
// Subscribe to topics.
|
||||||
const topics = [...this._topics.keys()];
|
const topics = [...this._topics.keys()];
|
||||||
client.subscribe(topics);
|
client.subscribe(topics);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue