Skip to content

Commit

Permalink
Fix cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
tb0hdan committed Jul 25, 2023
1 parent 4b798e2 commit e099fda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mesh.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ AirRaidPrivate = aaabbbccc
# en: Externally accessible web app URL
ExternalURL = https://example.com/
# en: Shortener service to use: pls, tly. Long URL by default
ShortenerService = 'pls'
ShortenerService = pls
TLYToken = aaabbb
PLSST = aaabbbb

Expand Down
4 changes: 2 additions & 2 deletions mtg/bot/telegram/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ def echo(self, update: Update, _) -> None:
file_path = os.path.basename(urlparse(photo_file.file_path).path)
photo_file.download(f'./web/static/t/{file_path}')
long_url = f'{self.config.WebApp.ExternalURL}/static/t/{file_path}'
if self.config.WebApp.Shortener == 'pls':
if self.config.WebApp.ShortenerService == 'pls':
short_url = self.shorten_pls(long_url)
elif self.config.WebApp.Shortener == 'tly':
elif self.config.WebApp.ShortenerService == 'tly':
short_url = self.shorten_tly(long_url)
else:
short_url = long_url
Expand Down

0 comments on commit e099fda

Please sign in to comment.