(20250128) Telegram Auth is operational now.

This commit is contained in:
2025-01-28 11:02:15 +05:30
parent 3b8d248d82
commit 48753dd617
5 changed files with 282 additions and 16 deletions
+31
View File
@@ -248,6 +248,37 @@ async def callback_test(
"senderId": inbound_data.auth.senderId
},
display_name = inbound_data.auth.senderId,
display_picture = None,
session_token = inbound_headers["X-Session-Token"]
)
# ┏┓ ┏┳┓ ┓
# ┣ ┏┓┏┓ ┃ ┏┓┃┏┓┏┓┏┓┏┓┏┳┓
# ┻ ┗┛┛ ┻ ┗ ┗┗ ┗┫┛ ┗┻┛┗┗
# ┛
if inbound_data.chatClient == "telegram":
success = await current_app.telegram_controller.set_token_direct(
sql_conn = current_app.sql_writer,
mongo_data_conn = current_app.data_mongo,
auth_token = CoreAuthTokenModel(
serviceType = "chat",
client = inbound_data.chatClient,
authType = "auth",
auth = inbound_data.auth.model_dump(),
user = kwargs.get("session_info"),
clientUserId = {
"botToken": inbound_data.auth.botToken
},
status = "active",
syncFreq = 60
),
token_notes = {
"botId": inbound_data.auth.botId,
"botName": inbound_data.auth.botName
},
display_name = inbound_data.auth.botName,
display_picture = None,
session_token = inbound_headers["X-Session-Token"]
)