mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
disable bounced email in alias log
This commit is contained in:
parent
0e7a77130c
commit
74d1f87db0
@ -146,7 +146,9 @@ def get_alias_activities(alias_id):
|
||||
activity["to"] = alias_log.alias
|
||||
activity["from"] = alias_log.website_from or alias_log.website_email
|
||||
|
||||
if alias_log.blocked:
|
||||
if alias_log.bounced:
|
||||
activity["action"] = "bounced"
|
||||
elif alias_log.blocked:
|
||||
activity["action"] = "block"
|
||||
else:
|
||||
activity["action"] = "forward"
|
||||
|
@ -117,6 +117,8 @@
|
||||
<img src="{{ url_for('static', filename='arrows/reply-arrow.svg') }}" class="arrow">
|
||||
{% elif log.blocked %}
|
||||
<img src="{{ url_for('static', filename='arrows/blocked-arrow.svg') }}" class="arrow">
|
||||
{% elif log.bounced %}
|
||||
<span class="text-danger"> --- Refused (or bounced) ---> </span>
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='arrows/forward-arrow.svg') }}" class="arrow">
|
||||
{% endif %}
|
||||
|
@ -15,6 +15,7 @@ class AliasLog:
|
||||
when: arrow.Arrow
|
||||
is_reply: bool
|
||||
blocked: bool
|
||||
bounced: bool
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
for k, v in kwargs.items():
|
||||
@ -79,6 +80,7 @@ def get_alias_log(gen_email: GenEmail, page_id=0):
|
||||
when=fel.created_at,
|
||||
is_reply=fel.is_reply,
|
||||
blocked=fel.blocked,
|
||||
bounced=fel.bounced,
|
||||
)
|
||||
logs.append(al)
|
||||
logs = sorted(logs, key=lambda l: l.when, reverse=True)
|
||||
|
Loading…
Reference in New Issue
Block a user