mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of gitlab.com:bashrc2/epicyon
commit
6eeb67e0a3
|
@ -177,6 +177,8 @@ def is_following_actor(base_dir: str,
|
||||||
following_file = base_dir + '/accounts/' + handle + '/following.txt'
|
following_file = base_dir + '/accounts/' + handle + '/following.txt'
|
||||||
if not os.path.isfile(following_file):
|
if not os.path.isfile(following_file):
|
||||||
return False
|
return False
|
||||||
|
if actor.startswith('@'):
|
||||||
|
actor = actor[1:]
|
||||||
if actor.lower() in open(following_file).read().lower():
|
if actor.lower() in open(following_file).read().lower():
|
||||||
return True
|
return True
|
||||||
following_nickname = get_nickname_from_actor(actor)
|
following_nickname = get_nickname_from_actor(actor)
|
||||||
|
|
|
@ -32,14 +32,21 @@ def _html_podcast_social_interactions(podcast_properties: {},
|
||||||
return ''
|
return ''
|
||||||
if not podcast_properties['socialInteract'].get('text'):
|
if not podcast_properties['socialInteract'].get('text'):
|
||||||
return ''
|
return ''
|
||||||
post_url = podcast_properties['socialInteract']['text']
|
episode_post_url = podcast_properties['socialInteract']['text']
|
||||||
|
actor_str = ''
|
||||||
|
if podcast_properties['socialInteract'].get('accountId'):
|
||||||
|
actor_handle = podcast_properties['socialInteract']['accountId']
|
||||||
|
if actor_handle.startswith('@'):
|
||||||
|
actor_handle = actor_handle[1:]
|
||||||
|
actor_str = '?actor=' + actor_handle
|
||||||
|
|
||||||
podcast_str = \
|
podcast_str = \
|
||||||
'<center>\n' + \
|
'<center>\n' + \
|
||||||
' <a href="/users/' + nickname + \
|
' <a href="/users/' + nickname + \
|
||||||
'?replyto=' + post_url + '" target="_blank" ' + \
|
'?replyto=' + episode_post_url + actor_str + '" target="_blank" ' + \
|
||||||
'rel="nofollow noopener noreferrer">💬 ' + \
|
'rel="nofollow noopener noreferrer">💬 ' + \
|
||||||
translate['Leave a comment'] + '</a>\n' + \
|
translate['Leave a comment'] + '</a>\n' + \
|
||||||
' <a href="' + post_url + '" target="_blank" ' + \
|
' <a href="' + episode_post_url + '" target="_blank" ' + \
|
||||||
'rel="nofollow noopener noreferrer">' + \
|
'rel="nofollow noopener noreferrer">' + \
|
||||||
translate['View comments'] + '</a>\n' + \
|
translate['View comments'] + '</a>\n' + \
|
||||||
'</center>\n'
|
'</center>\n'
|
||||||
|
|
Loading…
Reference in New Issue