(20250128) Telegram Auth is operational now.
This commit is contained in:
@@ -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"]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user