mirror of https://gitlab.com/bashrc2/epicyon
Unify maximum message length in bytes
parent
f4af6a139b
commit
c5f07a1a1c
|
@ -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:
|
||||
|
|
5
inbox.py
5
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
|
||||
|
|
Loading…
Reference in New Issue