@textback/notification-widget
Version:
TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.
24 lines (19 loc) • 519 B
JavaScript
import Channel from "./channel.js";
export default class MaxChannel extends Channel {
constructor(channelData = {}, deeplink, widget) {
super(channelData, deeplink, widget);
}
subscribe() {
super.subscribe();
if (this.widget.config.tgRedirector) {
return window.open(
`${this.widget.config.tgRedirector}${this.id}?start=${this.deeplink}`,
"tb_max",
);
}
return window.open(
`https://max.ru/${this.id}?start=${this.deeplink}`,
"tb_max",
);
}
}