Add info button to search result if not following

main
Bob Mottram 2023-02-14 10:45:40 +00:00
parent 805e29fbe0
commit 4e9535a52d
1 changed files with 9 additions and 0 deletions

View File

@ -363,6 +363,15 @@ def html_profile_after_search(recent_posts_cache: {}, max_recent_posts: int,
' <input type="hidden" name="actor" value="' + \
person_url + '">\n'
if not is_following_actor(base_dir, nickname, domain, person_url):
if is_moderator(base_dir, nickname):
search_handle = search_nickname + '@' + search_domain_full
profile_str += ' <input type="hidden" ' + \
'name="moderationAction" value="' + search_handle + '">\n'
profile_str += \
' <button type="submit" class="button" ' + \
'name="submitInfo" ' + \
'accesskey="' + access_keys['infoButton'] + '">' + \
translate['Info'] + '</button>\n'
profile_str += \
' <button type="submit" class="button" ' + \
'name="submitYes" ' + \