mirror of https://gitlab.com/bashrc2/epicyon
to and cc should be lists
parent
01a8ab59f5
commit
e10f90f121
|
@ -988,7 +988,7 @@ def send_follow_request(session, base_dir: str,
|
||||||
'object': followed_id
|
'object': followed_id
|
||||||
}
|
}
|
||||||
if group_account:
|
if group_account:
|
||||||
new_follow_json['to'] = followed_id
|
new_follow_json['to'] = [followed_id]
|
||||||
print('Follow request: ' + str(new_follow_json))
|
print('Follow request: ' + str(new_follow_json))
|
||||||
|
|
||||||
if follow_approval_required(base_dir, nickname, domain, debug,
|
if follow_approval_required(base_dir, nickname, domain, debug,
|
||||||
|
|
2
inbox.py
2
inbox.py
|
@ -5795,6 +5795,8 @@ def _receive_follow_request(session, session_onion, session_i2p,
|
||||||
'nickname. Assuming single user instance.')
|
'nickname. Assuming single user instance.')
|
||||||
if not message_json.get('to'):
|
if not message_json.get('to'):
|
||||||
message_json['to'] = message_json['object']
|
message_json['to'] = message_json['object']
|
||||||
|
if not isinstance(message_json['to'], list):
|
||||||
|
message_json['to'] = [message_json['to']]
|
||||||
if not has_users_path(message_json['object']):
|
if not has_users_path(message_json['object']):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: users/profile/author/channel/accounts ' +
|
print('DEBUG: users/profile/author/channel/accounts ' +
|
||||||
|
|
2
posts.py
2
posts.py
|
@ -2588,6 +2588,8 @@ def create_direct_message_post(base_dir: str,
|
||||||
auto_cw_cache)
|
auto_cw_cache)
|
||||||
# mentioned recipients go into To rather than Cc
|
# mentioned recipients go into To rather than Cc
|
||||||
message_json['to'] = message_json['object']['cc']
|
message_json['to'] = message_json['object']['cc']
|
||||||
|
if not isinstance(message_json['to'], list):
|
||||||
|
message_json['to'] = [message_json['to']]
|
||||||
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'] = []
|
||||||
|
|
Loading…
Reference in New Issue