mirror of
https://git.skyjake.fi/gemini/bubble.git
synced 2024-06-23 00:57:10 +00:00
Email: Send every 15 mins; include server port in URLs; no timestamps
This commit is contained in:
parent
f4407d138d
commit
870916f92e
|
@ -27,7 +27,7 @@ class Emailer (threading.Thread):
|
|||
self.site_name = cfg.get('name', 'Bubble')
|
||||
self.site_info = cfg.get('info', "Bulletin Boards for Gemini")
|
||||
|
||||
self.email_interval = int(cfg.get("email.interval", 60))
|
||||
self.email_interval = int(cfg.get("email.interval", 60 * 15))
|
||||
self.email_cmd = cfg.get("email.cmd", "")
|
||||
self.email_from = cfg.get('email.from', 'nobody@example.com')
|
||||
self.email_footer = f'\n---\n{self.site_name}\n{self.site_info}\n'
|
||||
|
@ -48,8 +48,8 @@ class Emailer (threading.Thread):
|
|||
|
||||
messages = {}
|
||||
footer = \
|
||||
f'\nView notifications in your dashboard:\n=> gemini://{self.hostname}/dashboard\n' + \
|
||||
f'\nChange notification settings:\n=> gemini://{self.hostname}/settings\n' + \
|
||||
f'\nView notifications in your Dashboard:\n=> {self.server_link}/dashboard\n' + \
|
||||
f'\nChange notification settings:\n=> {self.server_link}/settings\n' + \
|
||||
self.email_footer
|
||||
|
||||
for id, name, email, enabled_types in pending_notifs:
|
||||
|
@ -72,7 +72,7 @@ class Emailer (threading.Thread):
|
|||
notif = Notification(notif_id, type, dst, src, post, False, ts,
|
||||
src_name, post_title)
|
||||
count += 1
|
||||
_, label = notif.entry()
|
||||
_, label = notif.entry(show_age=False)
|
||||
body += '* ' + label + '\n'
|
||||
|
||||
if count:
|
||||
|
|
Loading…
Reference in New Issue
Block a user