mirror of https://gitlab.com/bashrc2/epicyon
parent
4daec86f2a
commit
edb01af961
|
@ -408,7 +408,7 @@ def post_message_to_outbox(session, translate: {},
|
|||
# The following activity types get added to the index files
|
||||
indexed_activities = (
|
||||
'Create', 'Question', 'Note', 'EncryptedMessage', 'Article',
|
||||
'Patch', 'Announce'
|
||||
'Patch', 'Announce', 'ChatMessage'
|
||||
)
|
||||
if message_json['type'] in indexed_activities:
|
||||
indexes = [outbox_name, "inbox"]
|
||||
|
|
8
posts.py
8
posts.py
|
@ -484,9 +484,9 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
|
|||
this_item = item['object']
|
||||
# check that this is a public post
|
||||
# #Public should appear in the "to" list
|
||||
itemIsNote = False
|
||||
item_is_note = False
|
||||
if item['type'] == 'Note' or item['type'] == 'Page':
|
||||
itemIsNote = True
|
||||
item_is_note = True
|
||||
|
||||
if isinstance(this_item, dict):
|
||||
if this_item.get('to'):
|
||||
|
@ -497,7 +497,7 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
|
|||
break
|
||||
if not is_public:
|
||||
return False
|
||||
elif isinstance(this_item, str) or itemIsNote:
|
||||
elif isinstance(this_item, str) or item_is_note:
|
||||
if item.get('to'):
|
||||
is_public = False
|
||||
for recipient in item['to']:
|
||||
|
@ -3561,6 +3561,7 @@ def is_image_media(session, base_dir: str, http_prefix: str,
|
|||
if post_json_object['object']['type'] != 'Note' and \
|
||||
post_json_object['object']['type'] != 'Page' and \
|
||||
post_json_object['object']['type'] != 'Event' and \
|
||||
post_json_object['object']['type'] != 'ChatMessage' and \
|
||||
post_json_object['object']['type'] != 'Article':
|
||||
return False
|
||||
if not post_json_object['object'].get('attachment'):
|
||||
|
@ -3583,6 +3584,7 @@ def _add_post_string_to_timeline(post_str: str, boxname: str,
|
|||
# must be a recognized ActivityPub type
|
||||
if ('"Note"' in post_str or
|
||||
'"EncryptedMessage"' in post_str or
|
||||
'"ChatMessage"' in post_str or
|
||||
'"Event"' in post_str or
|
||||
'"Article"' in post_str or
|
||||
'"Patch"' in post_str or
|
||||
|
|
2
utils.py
2
utils.py
|
@ -2661,6 +2661,7 @@ def is_dm(post_json_object: {}) -> bool:
|
|||
return False
|
||||
if not has_object_dict(post_json_object):
|
||||
return False
|
||||
if post_json_object['object']['type'] != 'ChatMessage':
|
||||
if post_json_object['object']['type'] != 'Note' and \
|
||||
post_json_object['object']['type'] != 'Page' and \
|
||||
post_json_object['object']['type'] != 'Patch' and \
|
||||
|
@ -2693,6 +2694,7 @@ def is_reply(post_json_object: {}, actor: str) -> bool:
|
|||
if post_json_object['object']['type'] != 'Note' and \
|
||||
post_json_object['object']['type'] != 'Page' and \
|
||||
post_json_object['object']['type'] != 'EncryptedMessage' and \
|
||||
post_json_object['object']['type'] != 'ChatMessage' and \
|
||||
post_json_object['object']['type'] != 'Article':
|
||||
return False
|
||||
if post_json_object['object'].get('inReplyTo'):
|
||||
|
|
Loading…
Reference in New Issue