mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-06 13:15:35 +00:00
perf: 优化撤回消息逻辑
This commit is contained in:
parent
6ebc89695a
commit
b482947207
@ -1093,7 +1093,7 @@ class DialogController extends AbstractController
|
|||||||
//
|
//
|
||||||
if ($update_id > 0) {
|
if ($update_id > 0) {
|
||||||
$action = $update_mark ? "update-$update_id" : "change-$update_id";
|
$action = $update_mark ? "update-$update_id" : "change-$update_id";
|
||||||
if (!($user->bot || $user->isAdmin())) {
|
if (!$user->bot) {
|
||||||
Setting::validateMsgLimit('edit', $update_id);
|
Setting::validateMsgLimit('edit', $update_id);
|
||||||
}
|
}
|
||||||
} elseif ($reply_id > 0) {
|
} elseif ($reply_id > 0) {
|
||||||
@ -1818,7 +1818,7 @@ class DialogController extends AbstractController
|
|||||||
if (empty($msg)) {
|
if (empty($msg)) {
|
||||||
return Base::retError("消息不存在或已被删除");
|
return Base::retError("消息不存在或已被删除");
|
||||||
}
|
}
|
||||||
if (!($user->bot || $user->isAdmin())) {
|
if (!$user->bot) {
|
||||||
Setting::validateMsgLimit('rev', $msg);
|
Setting::validateMsgLimit('rev', $msg);
|
||||||
}
|
}
|
||||||
$msg->withdrawMsg();
|
$msg->withdrawMsg();
|
||||||
|
|||||||
@ -214,7 +214,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</Input>
|
</Input>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-tip">{{$L('消息发出后的可撤回时长。')}} ({{$L('系统管理员除外')}})</div>
|
<div class="form-tip">{{$L('消息发出后的可撤回时长。')}}</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :label="$L('修改消息限制')" prop="msgEditLimit">
|
<FormItem :label="$L('修改消息限制')" prop="msgEditLimit">
|
||||||
<div style="width: 220px;">
|
<div style="width: 220px;">
|
||||||
@ -224,7 +224,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</Input>
|
</Input>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-tip">{{$L('消息发出后的可修改时长。')}} ({{$L('系统管理员除外')}})</div>
|
<div class="form-tip">{{$L('消息发出后的可修改时长。')}}</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user