merge-requests/30/head
Bob Mottram 2023-01-12 11:35:37 +00:00
parent a06bb9217c
commit 818f54f472
1 changed files with 14 additions and 15 deletions

View File

@ -3821,11 +3821,9 @@ def _is_valid_dm(base_dir: str, nickname: str, domain: str, port: int,
# Not sending to yourself
if not sending_to_self:
obj_has_dict = has_object_dict(post_json_object)
# is this a vote on a question?
if obj_has_dict:
if post_json_object['object'].get("name") and \
post_json_object['object'].get("inReplyTo"):
if is_vote(base_dir, nickname, domain,
post_json_object):
# make the content the same as the vote answer
post_json_object['object']['content'] = \
post_json_object['object']['name']
@ -3848,6 +3846,7 @@ def _is_valid_dm(base_dir: str, nickname: str, domain: str, port: int,
# send back a bounce DM
if post_json_object.get('id') and \
post_json_object.get('object'):
obj_has_dict = has_object_dict(post_json_object)
# don't send bounces back to
# replies to bounce messages
obj = post_json_object['object']