mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Bugfix template
This commit is contained in:
parent
d376e53d2f
commit
9332b348eb
2 changed files with 13 additions and 2 deletions
5
app.py
5
app.py
|
@ -994,6 +994,10 @@ def notifications():
|
|||
"activity.object": {"$regex": f"^{BASE_URL}"},
|
||||
}
|
||||
new_followers_query = {"type": ActivityType.FOLLOW.value}
|
||||
unfollow_query = {
|
||||
"type": ActivityType.UNDO.value,
|
||||
"activity.object.type": ActivityType.FOLLOW.value,
|
||||
}
|
||||
followed_query = {"type": ActivityType.ACCEPT.value}
|
||||
q = {
|
||||
"box": Box.INBOX.value,
|
||||
|
@ -1003,6 +1007,7 @@ def notifications():
|
|||
replies_query,
|
||||
new_followers_query,
|
||||
followed_query,
|
||||
unfollow_query,
|
||||
],
|
||||
}
|
||||
c = request.args.get("cursor")
|
||||
|
|
|
@ -21,13 +21,19 @@
|
|||
{% endif %}
|
||||
|
||||
{% if item | has_type('Follow') %}
|
||||
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-hover">new follower</span> <!-- <a href="" class="bar-item">follow back</a></p> -->
|
||||
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-no-hover">new follower</span> <!-- <a href="" class="bar-item">follow back</a></p> -->
|
||||
<div style="height: 100px;">
|
||||
{{ utils.display_actor_inline(item.activity.actor | get_actor, size=50) }}
|
||||
</div>
|
||||
|
||||
{% elif item | has_type('Accept') %}
|
||||
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-hover">you started following</span></p>
|
||||
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-no-hover">you started following</span></p>
|
||||
<div style="height: 100px;">
|
||||
{{ utils.display_actor_inline(item.activity.actor | get_actor, size=50) }}
|
||||
</div>
|
||||
|
||||
{% elif item | has_type('Undo') %}
|
||||
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-no-hover">unfollowed you</span></p>
|
||||
<div style="height: 100px;">
|
||||
{{ utils.display_actor_inline(item.activity.actor | get_actor, size=50) }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue