UNPKG

@textback/notification-widget

Version:

TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.

19 lines (14 loc) 562 B
import Channel from './channel.js'; import constants from '../utils/constants.js'; export default class TelegramChannel 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_tg'); } return window.open(`https://telegram.me/${this.id}?start=${this.deeplink}`, 'tb_tg'); } }