Plug in Mastodon section

This commit is contained in:
kk6fut 2022-12-14 08:49:05 -08:00
parent 0ee71ee2cc
commit 4963c8b15e
1 changed files with 6 additions and 1 deletions

View File

@ -463,6 +463,11 @@ class Plane:
from defTelegram import sendTeleg
photo = open(self.map_file_name, "rb")
sendTeleg(photo, message, self.config)
#Mastodon
if self.config.has_section('MASTODON') and self.config.getboolean('MASTODON', 'ENABLE'):
from defMastodon import sendMastodon
sendMastodon(self.map_file_name, message, self.config)
#Discord
if self.config.getboolean('DISCORD', 'ENABLE'):
role_id = self.config.get('DISCORD', 'ROLE_ID') if self.config.has_option('DISCORD', 'ROLE_ID') and self.config.get('DISCORD', 'ROLE_ID').strip() != "" else None
@ -880,4 +885,4 @@ class Plane:
print(time_since_ra)
if time_since_ra.seconds >= 600:
print(ra_type)
self.recent_ra_types.pop(ra_type)
self.recent_ra_types.pop(ra_type)