diff --git a/daemon_utils.py b/daemon_utils.py index 66ae4894e..653f341d7 100644 --- a/daemon_utils.py +++ b/daemon_utils.py @@ -537,7 +537,8 @@ def update_inbox_queue(self, nickname: str, message_json: {}, self.server.blocked_cache, self.server.block_federated, self.server.system_language, - mitm) + mitm, + self.server.maxMessageLength) if queue_filename: # add json to the queue if queue_filename not in self.server.inbox_queue: diff --git a/inbox.py b/inbox.py index 91f11c323..3d6858a6d 100644 --- a/inbox.py +++ b/inbox.py @@ -395,11 +395,12 @@ def save_post_to_inbox_queue(base_dir: str, http_prefix: str, blocked_cache: [], block_federated: [], system_language: str, - mitm: bool) -> str: + mitm: bool, + max_message_bytes: int) -> str: """Saves the given json to the inbox queue for the person key_id specifies the actor sending the post """ - if len(message_bytes) > 20000: + if len(message_bytes) > max_message_bytes: print('REJECT: inbox message too long ' + str(len(message_bytes)) + ' bytes') return None