refactor: remove payload preview length limitation in webhook processing

This commit is contained in:
Abhimanyu Saharan
2026-02-15 12:34:05 +05:30
parent f9b14af477
commit 7fe5ad5cba
2 changed files with 2 additions and 8 deletions

View File

@@ -44,7 +44,6 @@ SESSION_DEP = Depends(get_session)
BOARD_USER_READ_DEP = Depends(get_board_for_user_read)
BOARD_USER_WRITE_DEP = Depends(get_board_for_user_write)
BOARD_OR_404_DEP = Depends(get_board_or_404)
PAYLOAD_PREVIEW_MAX_CHARS = 1600
def _webhook_endpoint_path(board_id: UUID, webhook_id: UUID) -> str:
@@ -177,9 +176,7 @@ def _payload_preview(
preview = json.dumps(value, indent=2, ensure_ascii=True)
except TypeError:
preview = str(value)
if len(preview) <= PAYLOAD_PREVIEW_MAX_CHARS:
return preview
return f"{preview[: PAYLOAD_PREVIEW_MAX_CHARS - 3]}..."
return preview
def _webhook_memory_content(