fix: always use MarkdownV2 for all message types
This commit is contained in:
23
_test_verify.py
Normal file
23
_test_verify.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import json
|
||||
from src.tg_bot import format_summary, _summary_keyboard
|
||||
|
||||
data = {
|
||||
'subject': '确认码',
|
||||
'recipient': 'test@test.com',
|
||||
'sender': 'Kraken <noreply@kraken.com>',
|
||||
'category': 'notification',
|
||||
'summary': 'Kraken确认码',
|
||||
'verification_code': 'Kraken 701383',
|
||||
'links': [],
|
||||
'can_reply': False,
|
||||
'reply_suggestions': []
|
||||
}
|
||||
|
||||
text = format_summary(data, 'test@test.com')
|
||||
kb = _summary_keyboard(False, False, [])
|
||||
|
||||
print('=== text ===')
|
||||
print(repr(text))
|
||||
print()
|
||||
print('=== keyboard ===')
|
||||
print(json.dumps(kb, ensure_ascii=False, indent=2))
|
||||
Reference in New Issue
Block a user