MCPcopy
hub / github.com/AstrBotDevs/AstrBot / webhook_callback

Method webhook_callback

tests/test_fastapi_v1_dashboard.py:391–401  ·  view source on GitHub ↗
(self, request_obj)

Source from the content-addressed store, hash-verified

389 return True
390
391 async def webhook_callback(self, request_obj):
392 payload = await request_obj.get_json(silent=True)
393 if payload.get("response_mode") == "plain":
394 return "success"
395 if payload.get("response_mode") == "tuple":
396 return "accepted", 202, {"Content-Type": "text/plain"}
397 return {
398 "webhook_uuid": self.config["webhook_uuid"],
399 "method": request_obj.method,
400 "payload": payload,
401 }
402
403 async def send_by_session(self, session, message_chain) -> None:
404 self.sent_messages.append((session, message_chain))

Callers

nothing calls this directly

Calls 2

get_jsonMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected