feat: cleanup join notice with welcome message
This commit is contained in:
+2
-2
@@ -401,7 +401,7 @@ def normalize_ban(row: dict) -> dict:
|
||||
|
||||
@app.get("/api/messages")
|
||||
async def api_messages(limit: int = Query(default=50, ge=1, le=500), chat_id: int | None = None):
|
||||
qs = Message.all()
|
||||
qs = Message.exclude(text="__service__:new_chat_member")
|
||||
if chat_id is not None:
|
||||
qs = qs.filter(chat_id=chat_id)
|
||||
msgs = await qs.order_by("-created_at").limit(limit).values()
|
||||
@@ -411,7 +411,7 @@ async def api_messages(limit: int = Query(default=50, ge=1, le=500), chat_id: in
|
||||
@app.get("/api/chat")
|
||||
async def api_chat(limit: int = Query(default=100, ge=1, le=500), chat_id: int | None = None):
|
||||
"""兼容旧前端:返回聊天记录。"""
|
||||
qs = Message.all()
|
||||
qs = Message.exclude(text="__service__:new_chat_member")
|
||||
if chat_id is not None:
|
||||
qs = qs.filter(chat_id=chat_id)
|
||||
msgs = await qs.order_by("-created_at").limit(limit).values()
|
||||
|
||||
Reference in New Issue
Block a user