diff --git a/app/chat/controller/MessageController.php b/app/chat/controller/MessageController.php index 226cabe..7f1d844 100644 --- a/app/chat/controller/MessageController.php +++ b/app/chat/controller/MessageController.php @@ -234,13 +234,13 @@ class MessageController extends ApiController $list_json = Redis::get('usermsg:list:' . $this->user_type . ':' . $this->uid); if($list_json) { $list_arr = json_decode($list_json, true); - foreach ($list_arr as $k => $list) { + foreach ($list_arr as $k => &$list) { if($list['session_id'] == $session_id) { - $list['id_del'] = 1; + $list['is_del'] = 1; } } if(count($list_arr) >= 1) { - Redis::setEx('usermsg:list:' . $this->user_type . ':' . $this->uid, 30 * 86400, json_encode($list_arr)); + Redis::set('usermsg:list:' . $this->user_type . ':' . $this->uid, json_encode($list_arr)); }else { Redis::del('usermsg:list:' . $this->user_type . ':' . $this->uid); }