AI 3 months ago
parent
commit
ceeedeb9bd
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/JsonRpc/ChatService.php

+ 3 - 0
app/JsonRpc/ChatService.php

@@ -232,6 +232,7 @@ class ChatService implements ChatServiceInterface
         $result = ChatFriends::where($where)
             ->orWhere($orwhere)->delete();
         var_dump($result, '-0------------------');
+        ChatRecords::where($where)->orWhere($orwhere)->delete();
         if ($result) {
             return Result::success("删除成功”");
         } else {
@@ -585,6 +586,8 @@ class ChatService implements ChatServiceInterface
     public function quitGroup(array $data): array
     {
         $result = ChatGroupsMember::where(['group_id' => $data['group_id'], 'user_id' => $data['user_id']])->delete();
+        ChatRecords::where(['receiver_id' => $data['group_id'], 'user_id' => $data['user_id']])->delete();
+
         if ($result) {
             return Result::success('退出成功');
         } else {