kenken999 commited on
Commit
3e058a9
·
1 Parent(s): cdaf3dd
Files changed (1) hide show
  1. mysite/routers/fastapi.py +2 -1
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,token)
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)