fix: remove all body truncation, show full email text everywhere
This commit is contained in:
@@ -34,7 +34,7 @@ def send_summary(tg_cfg: TelegramConfig, chat_id: str, summary_text: str,
|
|||||||
_email_contexts[msg_id] = {
|
_email_contexts[msg_id] = {
|
||||||
"summary_text": summary_text,
|
"summary_text": summary_text,
|
||||||
"summary_data": summary_data,
|
"summary_data": summary_data,
|
||||||
"original_body": original_body[:10000],
|
"original_body": original_body,
|
||||||
"original_sender": original_sender or summary_data.get("sender", ""),
|
"original_sender": original_sender or summary_data.get("sender", ""),
|
||||||
"original_recipient": original_recipient or summary_data.get("recipient", ""),
|
"original_recipient": original_recipient or summary_data.get("recipient", ""),
|
||||||
"original_reply_to": original_reply_to,
|
"original_reply_to": original_reply_to,
|
||||||
@@ -276,7 +276,7 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict):
|
|||||||
|
|
||||||
if action == CALLBACK_VIEW_ORIG and ctx:
|
if action == CALLBACK_VIEW_ORIG and ctx:
|
||||||
can_reply = ctx.get("can_reply", True)
|
can_reply = ctx.get("can_reply", True)
|
||||||
text = f"*📄 原文 \\- {_escape(ctx['subject'])}*\n\n{_escape(ctx['original_body'][:3500])}"
|
text = f"*📄 原文 \\- {_escape(ctx['subject'])}*\n\n{_escape(ctx['original_body'])}"
|
||||||
_tg_req(tg_cfg, "editMessageText", {
|
_tg_req(tg_cfg, "editMessageText", {
|
||||||
"chat_id": chat_id, "message_id": msg_id,
|
"chat_id": chat_id, "message_id": msg_id,
|
||||||
"text": text, "parse_mode": "MarkdownV2",
|
"text": text, "parse_mode": "MarkdownV2",
|
||||||
|
|||||||
Reference in New Issue
Block a user