Spaces:
Running
on
Zero
Running
on
Zero
fda
Browse files
mysite/routers/fastapi.py
CHANGED
@@ -103,6 +103,7 @@ def setup_webhook_routes(app: FastAPI):
|
|
103 |
|
104 |
webhook_url = os.getenv("chat_url")
|
105 |
token = os.getenv("token")
|
|
|
106 |
|
107 |
|
108 |
|
@@ -115,7 +116,7 @@ def setup_webhook_routes(app: FastAPI):
|
|
115 |
if event["type"] == "message" and event["message"]["type"] == "text":
|
116 |
user_id = event["source"]["userId"]
|
117 |
text = event["message"]["text"]
|
118 |
-
user_name,thmbnail = get_user_profile(user_id,
|
119 |
|
120 |
logger.info("Received Headers: %s", user_name)
|
121 |
logger.info("Received Headers: %s", thmbnail)
|
|
|
103 |
|
104 |
webhook_url = os.getenv("chat_url")
|
105 |
token = os.getenv("token")
|
106 |
+
ChannelAccessToken = os.getenv('ChannelAccessToken')
|
107 |
|
108 |
|
109 |
|
|
|
116 |
if event["type"] == "message" and event["message"]["type"] == "text":
|
117 |
user_id = event["source"]["userId"]
|
118 |
text = event["message"]["text"]
|
119 |
+
user_name,thmbnail = get_user_profile(user_id,ChannelAccessToken)
|
120 |
|
121 |
logger.info("Received Headers: %s", user_name)
|
122 |
logger.info("Received Headers: %s", thmbnail)
|