feat: show linked emails in telegram logs
This commit is contained in:
@@ -234,6 +234,7 @@ def _serialize_log(entry: MessageLog) -> Dict[str, Any]:
|
||||
"user_id": int(entry.user_id) if entry.user_id else None,
|
||||
"telegram_username": entry.telegram_username,
|
||||
"telegram_first_name": entry.telegram_first_name,
|
||||
"email": getattr(getattr(entry, "author_user", None), "email", None),
|
||||
"event_type": entry.event_type,
|
||||
"content": entry.content,
|
||||
"is_admin_event": bool(entry.is_admin_event),
|
||||
|
||||
@@ -311,7 +311,12 @@ async def activate_trial_route(request: web.Request) -> web.Response:
|
||||
notification_service = NotificationService(
|
||||
request.app["bot"], settings, i18n_instance
|
||||
)
|
||||
await notification_service.notify_trial_activation(user_id, end_date)
|
||||
await notification_service.notify_trial_activation(
|
||||
user_id,
|
||||
end_date,
|
||||
username=db_user.username,
|
||||
email=getattr(db_user, "email", None),
|
||||
)
|
||||
except Exception:
|
||||
logger.exception("Failed to send WebApp trial activation notification")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user