Rewrite TG integration, support for other webhooks

This commit is contained in:
Aarni Halinen
2022-01-13 00:05:02 +02:00
parent 6f316401f7
commit 4a530826a8
15 changed files with 461 additions and 258 deletions
-15
View File
@@ -148,18 +148,3 @@ class Application(CommentParent):
def has_any_board_role(self):
return self.preset_roles.filter(is_board=True).exists() or self.custom_roles.filter(is_board=True)
# Telegram channel entry for Kaehmys
class TelegramChannel(models.Model):
"""Model containing the channel id of a Telegram chat"""
class Meta:
verbose_name = _('Telegram channel')
verbose_name_plural = _('Telegram channels')
name = models.CharField(max_length=255)
channel_id = models.CharField(max_length=255, unique=True)
def __str__(self):
return 'Telegram channel: "{}"'.format(self.name)