forked from MarseyWorld/MarseyWorld
LGB: extend block & follower vis permissioning.
parent
f23b93fbe9
commit
a2ca535ce3
|
@ -641,7 +641,8 @@ def settings_block_user(v):
|
|||
)
|
||||
g.db.add(new_block)
|
||||
|
||||
send_notification(user.id, f"@{v.username} has blocked you!")
|
||||
if user.admin_level >= PERMS['USER_BLOCKS_VISIBLE']:
|
||||
send_notification(user.id, f"@{v.username} has blocked you!")
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
|
||||
|
@ -663,7 +664,7 @@ def settings_unblock_user(v):
|
|||
|
||||
g.db.delete(x)
|
||||
|
||||
if not v.shadowbanned:
|
||||
if not v.shadowbanned and user.admin_level >= PERMS['USER_BLOCKS_VISIBLE']:
|
||||
send_notification(user.id, f"@{v.username} has unblocked you!")
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
|
|
|
@ -128,9 +128,11 @@
|
|||
<img alt="marseybux" class="ml-1 mb-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Marseybux" height="20" width="46" src="/i/marseybux.webp?v=2000">
|
||||
{% endif %}
|
||||
|
||||
<a href="/@{{u.username}}/followers" id="profile--followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a>
|
||||
{% if PERMS['USER_FOLLOWS_VISIBLE'] == 0 or (v and v.admin_level >= PERMS['USER_FOLLOWS_VISIBLE']) -%}
|
||||
<a href="/@{{u.username}}/followers" id="profile--followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a>
|
||||
|
||||
<a href="/@{{u.username}}/following" id="profile--following">follows {{u.follow_count}} user{{'s' if u.follow_count != 1 else ''}}</a>
|
||||
<a href="/@{{u.username}}/following" id="profile--following">follows {{u.follow_count}} user{{'s' if u.follow_count != 1 else ''}}</a>
|
||||
{%- endif %}
|
||||
|
||||
<span id="profile--joined">joined <span id="profile--joined--time" data-bs-toggle="tooltip" data-bs-placement="bottom" onmouseover="timestamp('profile--joined--time','{{u.created_utc}}')">{{u.created_date}}</span></span>
|
||||
|
||||
|
@ -449,9 +451,11 @@
|
|||
<img alt="marseybux" class="ml-1 mb-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Marseybux" height="15" width="35" src="/i/marseybux.webp?v=2000">
|
||||
{% endif %}
|
||||
|
||||
<a href="/@{{u.username}}/followers" class="font-weight-bold" id="profile-mobile--followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a>
|
||||
{% if PERMS['USER_FOLLOWS_VISIBLE'] == 0 or (v and v.admin_level >= PERMS['USER_FOLLOWS_VISIBLE']) -%}
|
||||
<a href="/@{{u.username}}/followers" class="font-weight-bold" id="profile-mobile--followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a>
|
||||
|
||||
<a href="/@{{u.username}}/following" class="font-weight-bold" id="profile-mobile--following" style="display:block">follows {{u.follow_count}} user{{'s' if u.follow_count != 1 else ''}}</a>
|
||||
<a href="/@{{u.username}}/following" class="font-weight-bold" id="profile-mobile--following" style="display:block">follows {{u.follow_count}} user{{'s' if u.follow_count != 1 else ''}}</a>
|
||||
{%- endif %}
|
||||
|
||||
{% if u.basedcount %}
|
||||
<br><span id="profile-mobile--based">Based count: {{u.basedcount}}</span>
|
||||
|
|
Loading…
Reference in New Issue