mirror of
https://github.com/smallevilbeast/ntchat.git
synced 2025-07-07 23:16:06 +08:00
新增退出群接口
This commit is contained in:
parent
a95b6ad2dc
commit
4391ad51b1
|
@ -161,6 +161,14 @@ async def add_room_friend(model: models.ModifyRoomNameReqModel):
|
|||
return response_json(1, data)
|
||||
|
||||
|
||||
@app.post("/room/quit_room", summary="退出群", tags=["Room"],
|
||||
response_model=models.ResponseModel)
|
||||
@catch_exception()
|
||||
async def quit_room(model: models.RoomReqModel):
|
||||
data = client_mgr.get_client(model.guid).quit_room(model.room_wxid)
|
||||
return response_json(1, data)
|
||||
|
||||
|
||||
@app.post("/msg/send_text", summary="发送文本消息", tags=["Msg"], response_model=models.ResponseModel)
|
||||
@catch_exception()
|
||||
async def msg_send_text(model: models.SendTextReqModel):
|
||||
|
|
|
@ -101,8 +101,11 @@ class AddRoomFriendReqModel(ClientReqModel):
|
|||
verify: str
|
||||
|
||||
|
||||
class ModifyRoomNameReqModel(ClientReqModel):
|
||||
class RoomReqModel(ClientReqModel):
|
||||
room_wxid: str
|
||||
|
||||
|
||||
class ModifyRoomNameReqModel(RoomReqModel):
|
||||
name: str
|
||||
|
||||
|
||||
|
|
|
@ -349,3 +349,11 @@ class WeChat:
|
|||
}
|
||||
return self.__send_sync(send_type.MT_ADD_FRIEND_MSG, data)
|
||||
|
||||
def quit_room(self, room_wxid: str):
|
||||
"""
|
||||
退出群
|
||||
"""
|
||||
data = {
|
||||
"room_wxid": room_wxid
|
||||
}
|
||||
return self.__send(send_type.MT_QUIT_DEL_ROOM_MSG, data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user