perf: 【消息】列表取消置顶

This commit is contained in:
韦荣超
2022-02-17 09:35:32 +08:00
parent 9855c50367
commit 9878efb198
2 changed files with 7 additions and 2 deletions

View File

@@ -504,7 +504,8 @@ class DialogController extends AbstractController
->update([
'top' => 0
]);
$dialogUser->top = 1;
$top = $dialogUser->top === 1 ? 0 : 1;
$dialogUser->top = $top;
$dialogUser->save();
return Base::retSuccess("success", $dialogId);
}