mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-03-06 09:27:33 +01:00
Refactor y eliminar patrones raros.
This commit is contained in:
@@ -84,4 +84,10 @@ def compose_notification(notification, db, settings, relative_times, show_screen
|
||||
filtered = utils.evaluate_filters(post=notification, current_context="notifications")
|
||||
if filtered != None:
|
||||
text = _("hidden by filter {}").format(filtered)
|
||||
return [user, text, ts]
|
||||
return [user, text, ts]
|
||||
|
||||
def compose_announcement(announcement, db, settings, relative_times, show_screen_names, safe=False):
|
||||
# Use the default template or a configured one if available
|
||||
template = settings.get("templates", {}).get("announcement", templates.announcement_default_template)
|
||||
text = templates.render_announcement(announcement, template, settings, relative_times, db["utc_offset"])
|
||||
return [text]
|
||||
Reference in New Issue
Block a user