mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of gitlab.com:bashrc2/epicyon
commit
0d5616852b
|
@ -48,7 +48,7 @@ INVALID_CONTENT_STRINGS = (
|
||||||
'graph', 'showshare', 'category', 'showwanted',
|
'graph', 'showshare', 'category', 'showwanted',
|
||||||
'rmshare', 'rmwanted', 'repeatprivate',
|
'rmshare', 'rmwanted', 'repeatprivate',
|
||||||
'unrepeatprivate', 'replyto',
|
'unrepeatprivate', 'replyto',
|
||||||
'replyfollowers', 'replydm', 'editblogpost',
|
'replyfollowers', 'replydm', 'replychat', 'editblogpost',
|
||||||
'handle', 'blockdomain'
|
'handle', 'blockdomain'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
40
daemon.py
40
daemon.py
|
@ -2838,6 +2838,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
custom_submit_text = get_config_param(base_dir, 'customSubmitText')
|
custom_submit_text = get_config_param(base_dir, 'customSubmitText')
|
||||||
conversation_id = None
|
conversation_id = None
|
||||||
|
reply_is_chat = False
|
||||||
msg = html_new_post(self.server.css_cache,
|
msg = html_new_post(self.server.css_cache,
|
||||||
False, self.server.translate,
|
False, self.server.translate,
|
||||||
base_dir,
|
base_dir,
|
||||||
|
@ -2872,7 +2873,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.signing_priv_key_pem,
|
self.server.signing_priv_key_pem,
|
||||||
self.server.cw_lists,
|
self.server.cw_lists,
|
||||||
self.server.lists_enabled,
|
self.server.lists_enabled,
|
||||||
self.server.default_timeline).encode('utf-8')
|
self.server.default_timeline,
|
||||||
|
reply_is_chat).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
cookie, calling_domain, False)
|
cookie, calling_domain, False)
|
||||||
|
@ -2973,6 +2975,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
custom_submit_text = get_config_param(base_dir, 'customSubmitText')
|
custom_submit_text = get_config_param(base_dir, 'customSubmitText')
|
||||||
conversation_id = None
|
conversation_id = None
|
||||||
|
reply_is_chat = False
|
||||||
msg = html_new_post(self.server.css_cache,
|
msg = html_new_post(self.server.css_cache,
|
||||||
False, self.server.translate,
|
False, self.server.translate,
|
||||||
base_dir,
|
base_dir,
|
||||||
|
@ -3006,7 +3009,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.signing_priv_key_pem,
|
self.server.signing_priv_key_pem,
|
||||||
self.server.cw_lists,
|
self.server.cw_lists,
|
||||||
self.server.lists_enabled,
|
self.server.lists_enabled,
|
||||||
self.server.default_timeline).encode('utf-8')
|
self.server.default_timeline,
|
||||||
|
reply_is_chat).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
cookie, calling_domain, False)
|
cookie, calling_domain, False)
|
||||||
|
@ -13188,6 +13192,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
media_instance: bool, translate: {},
|
media_instance: bool, translate: {},
|
||||||
base_dir: str, http_prefix: str,
|
base_dir: str, http_prefix: str,
|
||||||
in_reply_to_url: str, reply_to_list: [],
|
in_reply_to_url: str, reply_to_list: [],
|
||||||
|
reply_is_chat: bool,
|
||||||
share_description: str, reply_page_number: int,
|
share_description: str, reply_page_number: int,
|
||||||
reply_category: str,
|
reply_category: str,
|
||||||
domain: str, domain_full: str,
|
domain: str, domain_full: str,
|
||||||
|
@ -13214,7 +13219,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
str(reply_interval_hours) + ' hours')
|
str(reply_interval_hours) + ' hours')
|
||||||
self._403()
|
self._403()
|
||||||
return True
|
return True
|
||||||
elif self.server.debug:
|
if self.server.debug:
|
||||||
print('Reply is within time interval: ' +
|
print('Reply is within time interval: ' +
|
||||||
str(reply_interval_hours) + ' hours')
|
str(reply_interval_hours) + ' hours')
|
||||||
|
|
||||||
|
@ -13267,7 +13272,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.signing_priv_key_pem,
|
self.server.signing_priv_key_pem,
|
||||||
self.server.cw_lists,
|
self.server.cw_lists,
|
||||||
self.server.lists_enabled,
|
self.server.lists_enabled,
|
||||||
self.server.default_timeline).encode('utf-8')
|
self.server.default_timeline,
|
||||||
|
reply_is_chat).encode('utf-8')
|
||||||
if not msg:
|
if not msg:
|
||||||
print('Error replying to ' + in_reply_to_url)
|
print('Error replying to ' + in_reply_to_url)
|
||||||
self._404()
|
self._404()
|
||||||
|
@ -15932,8 +15938,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
# replying as a direct message,
|
# replying as a direct message,
|
||||||
# for moderation posts or the dm timeline
|
# for moderation posts or the dm timeline
|
||||||
if '?replydm=' in self.path:
|
reply_is_chat = False
|
||||||
in_reply_to_url = self.path.split('?replydm=')[1]
|
if '?replydm=' in self.path or '?replychat=' in self.path:
|
||||||
|
reply_type = 'replydm'
|
||||||
|
if '?replychat=' in self.path:
|
||||||
|
reply_type = 'replychat'
|
||||||
|
reply_is_chat = True
|
||||||
|
in_reply_to_url = self.path.split('?' + reply_type + '=')[1]
|
||||||
in_reply_to_url = urllib.parse.unquote_plus(in_reply_to_url)
|
in_reply_to_url = urllib.parse.unquote_plus(in_reply_to_url)
|
||||||
if '?' in in_reply_to_url:
|
if '?' in in_reply_to_url:
|
||||||
# multiple parameters
|
# multiple parameters
|
||||||
|
@ -15970,9 +15981,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
share_description = \
|
share_description = \
|
||||||
share_description.replace('_', ' ')
|
share_description.replace('_', ' ')
|
||||||
|
|
||||||
self.path = self.path.split('?replydm=')[0] + '/newdm'
|
self.path = \
|
||||||
|
self.path.split('?' + reply_type + '=')[0] + '/newdm'
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print('DEBUG: replydm path ' + self.path)
|
print('DEBUG: ' + reply_type + ' path ' + self.path)
|
||||||
|
|
||||||
# Edit a blog post
|
# Edit a blog post
|
||||||
if authorized and \
|
if authorized and \
|
||||||
|
@ -16067,6 +16079,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.base_dir,
|
self.server.base_dir,
|
||||||
self.server.http_prefix,
|
self.server.http_prefix,
|
||||||
in_reply_to_url, reply_to_list,
|
in_reply_to_url, reply_to_list,
|
||||||
|
reply_is_chat,
|
||||||
share_description, reply_page_number,
|
share_description, reply_page_number,
|
||||||
reply_category,
|
reply_category,
|
||||||
self.server.domain,
|
self.server.domain,
|
||||||
|
@ -16915,6 +16928,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
city = get_spoofed_city(self.server.city,
|
city = get_spoofed_city(self.server.city,
|
||||||
self.server.base_dir,
|
self.server.base_dir,
|
||||||
nickname, self.server.domain)
|
nickname, self.server.domain)
|
||||||
|
|
||||||
conversation_id = None
|
conversation_id = None
|
||||||
if fields.get('conversationId'):
|
if fields.get('conversationId'):
|
||||||
conversation_id = fields['conversationId']
|
conversation_id = fields['conversationId']
|
||||||
|
@ -17301,6 +17315,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.domain_full,
|
self.server.domain_full,
|
||||||
self.server.person_cache)
|
self.server.person_cache)
|
||||||
|
|
||||||
|
reply_is_chat = False
|
||||||
|
if fields.get('replychatmsg'):
|
||||||
|
reply_is_chat = fields['replychatmsg']
|
||||||
|
|
||||||
message_json = \
|
message_json = \
|
||||||
create_direct_message_post(self.server.base_dir,
|
create_direct_message_post(self.server.base_dir,
|
||||||
nickname,
|
nickname,
|
||||||
|
@ -17329,7 +17347,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
conversation_id,
|
conversation_id,
|
||||||
self.server.low_bandwidth,
|
self.server.low_bandwidth,
|
||||||
content_license_url,
|
content_license_url,
|
||||||
languages_understood)
|
languages_understood,
|
||||||
|
reply_is_chat)
|
||||||
if message_json:
|
if message_json:
|
||||||
if fields['schedulePost']:
|
if fields['schedulePost']:
|
||||||
return 1
|
return 1
|
||||||
|
@ -17392,7 +17411,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
conversation_id,
|
conversation_id,
|
||||||
self.server.low_bandwidth,
|
self.server.low_bandwidth,
|
||||||
self.server.content_license_url,
|
self.server.content_license_url,
|
||||||
languages_understood)
|
languages_understood,
|
||||||
|
False)
|
||||||
if message_json:
|
if message_json:
|
||||||
if fields['schedulePost']:
|
if fields['schedulePost']:
|
||||||
return 1
|
return 1
|
||||||
|
|
12
inbox.py
12
inbox.py
|
@ -2826,7 +2826,8 @@ def _bounce_dm(senderPostId: str, session, http_prefix: str,
|
||||||
last_bounce_message: [], system_language: str,
|
last_bounce_message: [], system_language: str,
|
||||||
signing_priv_key_pem: str,
|
signing_priv_key_pem: str,
|
||||||
content_license_url: str,
|
content_license_url: str,
|
||||||
languages_understood: []) -> bool:
|
languages_understood: [],
|
||||||
|
bounce_is_chat: bool) -> bool:
|
||||||
"""Sends a bounce message back to the sending handle
|
"""Sends a bounce message back to the sending handle
|
||||||
if a DM has been rejected
|
if a DM has been rejected
|
||||||
"""
|
"""
|
||||||
|
@ -2888,7 +2889,7 @@ def _bounce_dm(senderPostId: str, session, http_prefix: str,
|
||||||
system_language, conversation_id,
|
system_language, conversation_id,
|
||||||
low_bandwidth,
|
low_bandwidth,
|
||||||
content_license_url,
|
content_license_url,
|
||||||
languages_understood)
|
languages_understood, bounce_is_chat)
|
||||||
if not post_json_object:
|
if not post_json_object:
|
||||||
print('WARN: unable to create bounce message to ' + sending_handle)
|
print('WARN: unable to create bounce message to ' + sending_handle)
|
||||||
return False
|
return False
|
||||||
|
@ -2984,6 +2985,10 @@ def _is_valid_dm(base_dir: str, nickname: str, domain: str, port: int,
|
||||||
if not obj.get('inReplyTo'):
|
if not obj.get('inReplyTo'):
|
||||||
bounced_id = \
|
bounced_id = \
|
||||||
remove_id_ending(post_json_object['id'])
|
remove_id_ending(post_json_object['id'])
|
||||||
|
bounce_chat = False
|
||||||
|
if obj.get('type'):
|
||||||
|
if obj['type'] == 'ChatMessage':
|
||||||
|
bounce_chat = True
|
||||||
_bounce_dm(bounced_id,
|
_bounce_dm(bounced_id,
|
||||||
session, http_prefix,
|
session, http_prefix,
|
||||||
base_dir,
|
base_dir,
|
||||||
|
@ -2998,7 +3003,8 @@ def _is_valid_dm(base_dir: str, nickname: str, domain: str, port: int,
|
||||||
system_language,
|
system_language,
|
||||||
signing_priv_key_pem,
|
signing_priv_key_pem,
|
||||||
content_license_url,
|
content_license_url,
|
||||||
languages_understood)
|
languages_understood,
|
||||||
|
bounce_chat)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# dm index will be updated
|
# dm index will be updated
|
||||||
|
|
|
@ -408,7 +408,7 @@ def post_message_to_outbox(session, translate: {},
|
||||||
# The following activity types get added to the index files
|
# The following activity types get added to the index files
|
||||||
indexed_activities = (
|
indexed_activities = (
|
||||||
'Create', 'Question', 'Note', 'EncryptedMessage', 'Article',
|
'Create', 'Question', 'Note', 'EncryptedMessage', 'Article',
|
||||||
'Patch', 'Announce'
|
'Patch', 'Announce', 'ChatMessage'
|
||||||
)
|
)
|
||||||
if message_json['type'] in indexed_activities:
|
if message_json['type'] in indexed_activities:
|
||||||
indexes = [outbox_name, "inbox"]
|
indexes = [outbox_name, "inbox"]
|
||||||
|
|
13
posts.py
13
posts.py
|
@ -484,9 +484,9 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
|
||||||
this_item = item['object']
|
this_item = item['object']
|
||||||
# check that this is a public post
|
# check that this is a public post
|
||||||
# #Public should appear in the "to" list
|
# #Public should appear in the "to" list
|
||||||
itemIsNote = False
|
item_is_note = False
|
||||||
if item['type'] == 'Note' or item['type'] == 'Page':
|
if item['type'] == 'Note' or item['type'] == 'Page':
|
||||||
itemIsNote = True
|
item_is_note = True
|
||||||
|
|
||||||
if isinstance(this_item, dict):
|
if isinstance(this_item, dict):
|
||||||
if this_item.get('to'):
|
if this_item.get('to'):
|
||||||
|
@ -497,7 +497,7 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
|
||||||
break
|
break
|
||||||
if not is_public:
|
if not is_public:
|
||||||
return False
|
return False
|
||||||
elif isinstance(this_item, str) or itemIsNote:
|
elif isinstance(this_item, str) or item_is_note:
|
||||||
if item.get('to'):
|
if item.get('to'):
|
||||||
is_public = False
|
is_public = False
|
||||||
for recipient in item['to']:
|
for recipient in item['to']:
|
||||||
|
@ -2113,7 +2113,8 @@ def create_direct_message_post(base_dir: str,
|
||||||
location: str, system_language: str,
|
location: str, system_language: str,
|
||||||
conversation_id: str, low_bandwidth: bool,
|
conversation_id: str, low_bandwidth: bool,
|
||||||
content_license_url: str,
|
content_license_url: str,
|
||||||
languages_understood: []) -> {}:
|
languages_understood: [],
|
||||||
|
dm_is_chat: bool) -> {}:
|
||||||
"""Direct Message post
|
"""Direct Message post
|
||||||
"""
|
"""
|
||||||
content = resolve_petnames(base_dir, nickname, domain, content)
|
content = resolve_petnames(base_dir, nickname, domain, content)
|
||||||
|
@ -2144,6 +2145,8 @@ def create_direct_message_post(base_dir: str,
|
||||||
message_json['object']['to'] = message_json['to']
|
message_json['object']['to'] = message_json['to']
|
||||||
message_json['cc'] = []
|
message_json['cc'] = []
|
||||||
message_json['object']['cc'] = []
|
message_json['object']['cc'] = []
|
||||||
|
if dm_is_chat:
|
||||||
|
message_json['object']['type'] = 'ChatMessage'
|
||||||
if schedule_post:
|
if schedule_post:
|
||||||
post_id = remove_id_ending(message_json['object']['id'])
|
post_id = remove_id_ending(message_json['object']['id'])
|
||||||
save_post_to_box(base_dir, http_prefix, post_id,
|
save_post_to_box(base_dir, http_prefix, post_id,
|
||||||
|
@ -3561,6 +3564,7 @@ def is_image_media(session, base_dir: str, http_prefix: str,
|
||||||
if post_json_object['object']['type'] != 'Note' and \
|
if post_json_object['object']['type'] != 'Note' and \
|
||||||
post_json_object['object']['type'] != 'Page' and \
|
post_json_object['object']['type'] != 'Page' and \
|
||||||
post_json_object['object']['type'] != 'Event' and \
|
post_json_object['object']['type'] != 'Event' and \
|
||||||
|
post_json_object['object']['type'] != 'ChatMessage' and \
|
||||||
post_json_object['object']['type'] != 'Article':
|
post_json_object['object']['type'] != 'Article':
|
||||||
return False
|
return False
|
||||||
if not post_json_object['object'].get('attachment'):
|
if not post_json_object['object'].get('attachment'):
|
||||||
|
@ -3583,6 +3587,7 @@ def _add_post_string_to_timeline(post_str: str, boxname: str,
|
||||||
# must be a recognized ActivityPub type
|
# must be a recognized ActivityPub type
|
||||||
if ('"Note"' in post_str or
|
if ('"Note"' in post_str or
|
||||||
'"EncryptedMessage"' in post_str or
|
'"EncryptedMessage"' in post_str or
|
||||||
|
'"ChatMessage"' in post_str or
|
||||||
'"Event"' in post_str or
|
'"Event"' in post_str or
|
||||||
'"Article"' in post_str or
|
'"Article"' in post_str or
|
||||||
'"Patch"' in post_str or
|
'"Patch"' in post_str or
|
||||||
|
|
15
utils.py
15
utils.py
|
@ -2654,6 +2654,19 @@ def reject_post_id(base_dir: str, nickname: str, domain: str,
|
||||||
reject_file.write('\n')
|
reject_file.write('\n')
|
||||||
|
|
||||||
|
|
||||||
|
def is_chat_message(post_json_object: {}) -> bool:
|
||||||
|
"""Returns true if the given post is a chat message
|
||||||
|
Note that is_dm should be checked before calling this
|
||||||
|
"""
|
||||||
|
if post_json_object['type'] != 'Create':
|
||||||
|
return False
|
||||||
|
if not has_object_dict(post_json_object):
|
||||||
|
return False
|
||||||
|
if post_json_object['object']['type'] != 'ChatMessage':
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def is_dm(post_json_object: {}) -> bool:
|
def is_dm(post_json_object: {}) -> bool:
|
||||||
"""Returns true if the given post is a DM
|
"""Returns true if the given post is a DM
|
||||||
"""
|
"""
|
||||||
|
@ -2661,6 +2674,7 @@ def is_dm(post_json_object: {}) -> bool:
|
||||||
return False
|
return False
|
||||||
if not has_object_dict(post_json_object):
|
if not has_object_dict(post_json_object):
|
||||||
return False
|
return False
|
||||||
|
if post_json_object['object']['type'] != 'ChatMessage':
|
||||||
if post_json_object['object']['type'] != 'Note' and \
|
if post_json_object['object']['type'] != 'Note' and \
|
||||||
post_json_object['object']['type'] != 'Page' and \
|
post_json_object['object']['type'] != 'Page' and \
|
||||||
post_json_object['object']['type'] != 'Patch' and \
|
post_json_object['object']['type'] != 'Patch' and \
|
||||||
|
@ -2693,6 +2707,7 @@ def is_reply(post_json_object: {}, actor: str) -> bool:
|
||||||
if post_json_object['object']['type'] != 'Note' and \
|
if post_json_object['object']['type'] != 'Note' and \
|
||||||
post_json_object['object']['type'] != 'Page' and \
|
post_json_object['object']['type'] != 'Page' and \
|
||||||
post_json_object['object']['type'] != 'EncryptedMessage' and \
|
post_json_object['object']['type'] != 'EncryptedMessage' and \
|
||||||
|
post_json_object['object']['type'] != 'ChatMessage' and \
|
||||||
post_json_object['object']['type'] != 'Article':
|
post_json_object['object']['type'] != 'Article':
|
||||||
return False
|
return False
|
||||||
if post_json_object['object'].get('inReplyTo'):
|
if post_json_object['object'].get('inReplyTo'):
|
||||||
|
|
|
@ -210,7 +210,8 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
|
||||||
system_language: str,
|
system_language: str,
|
||||||
max_like_count: int, signing_priv_key_pem: str,
|
max_like_count: int, signing_priv_key_pem: str,
|
||||||
cw_lists: {}, lists_enabled: str,
|
cw_lists: {}, lists_enabled: str,
|
||||||
boxName: str) -> str:
|
boxName: str,
|
||||||
|
reply_is_chat: bool) -> str:
|
||||||
"""New post screen
|
"""New post screen
|
||||||
"""
|
"""
|
||||||
reply_str = ''
|
reply_str = ''
|
||||||
|
@ -691,6 +692,9 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
|
||||||
dropdown_new_blog_suffix += '?replyto=' + inReplyTo
|
dropdown_new_blog_suffix += '?replyto=' + inReplyTo
|
||||||
dropdown_unlisted_suffix += '?replyto=' + inReplyTo
|
dropdown_unlisted_suffix += '?replyto=' + inReplyTo
|
||||||
dropdown_followers_suffix += '?replyfollowers=' + inReplyTo
|
dropdown_followers_suffix += '?replyfollowers=' + inReplyTo
|
||||||
|
if reply_is_chat:
|
||||||
|
dropdown_dm_suffix += '?replychat=' + inReplyTo
|
||||||
|
else:
|
||||||
dropdown_dm_suffix += '?replydm=' + inReplyTo
|
dropdown_dm_suffix += '?replydm=' + inReplyTo
|
||||||
for mentioned_actor in mentions:
|
for mentioned_actor in mentions:
|
||||||
dropdown_new_post_suffix += '?mention=' + mentioned_actor
|
dropdown_new_post_suffix += '?mention=' + mentioned_actor
|
||||||
|
@ -732,6 +736,9 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
|
||||||
'<form enctype="multipart/form-data" method="POST" ' + \
|
'<form enctype="multipart/form-data" method="POST" ' + \
|
||||||
'accept-charset="UTF-8" action="' + \
|
'accept-charset="UTF-8" action="' + \
|
||||||
path + '?' + endpoint + '?page=' + str(page_number) + '">\n'
|
path + '?' + endpoint + '?page=' + str(page_number) + '">\n'
|
||||||
|
if reply_is_chat:
|
||||||
|
new_post_form += \
|
||||||
|
' <input type="hidden" name="replychatmsg" value="yes">\n'
|
||||||
if conversationId:
|
if conversationId:
|
||||||
new_post_form += \
|
new_post_form += \
|
||||||
' <input type="hidden" name="conversationId" value="' + \
|
' <input type="hidden" name="conversationId" value="' + \
|
||||||
|
|
|
@ -33,6 +33,7 @@ from utils import has_object_dict
|
||||||
from utils import update_announce_collection
|
from utils import update_announce_collection
|
||||||
from utils import is_pgp_encrypted
|
from utils import is_pgp_encrypted
|
||||||
from utils import is_dm
|
from utils import is_dm
|
||||||
|
from utils import is_chat_message
|
||||||
from utils import reject_post_id
|
from utils import reject_post_id
|
||||||
from utils import is_recent_post
|
from utils import is_recent_post
|
||||||
from utils import get_config_param
|
from utils import get_config_param
|
||||||
|
@ -445,10 +446,13 @@ def _get_reply_icon_html(base_dir: str, nickname: str, domain: str,
|
||||||
'" title="' + reply_to_this_post_str + '">\n'
|
'" title="' + reply_to_this_post_str + '">\n'
|
||||||
else:
|
else:
|
||||||
if is_dm(post_json_object):
|
if is_dm(post_json_object):
|
||||||
|
reply_type = 'replydm'
|
||||||
|
if is_chat_message(post_json_object):
|
||||||
|
reply_type = 'replychat'
|
||||||
reply_str += \
|
reply_str += \
|
||||||
' ' + \
|
' ' + \
|
||||||
'<a class="imageAnchor" href="/users/' + nickname + \
|
'<a class="imageAnchor" href="/users/' + nickname + \
|
||||||
'?replydm=' + reply_to_link + \
|
'?' + reply_type + '=' + reply_to_link + \
|
||||||
'?actor=' + post_json_object['actor'] + \
|
'?actor=' + post_json_object['actor'] + \
|
||||||
conversation_str + \
|
conversation_str + \
|
||||||
'" title="' + reply_to_this_post_str + '">\n'
|
'" title="' + reply_to_this_post_str + '">\n'
|
||||||
|
|
Loading…
Reference in New Issue