mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 优化与离职账号聊天
This commit is contained in:
parent
aa1ea41c5d
commit
4f57b195a8
@ -222,10 +222,14 @@ class User extends AbstractModel
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回是否禁用帐号(离职)
|
* 返回是否禁用帐号(离职)
|
||||||
|
* @param bool $incAt 是否包含禁用时间
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isDisable()
|
public function isDisable($incAt = false)
|
||||||
{
|
{
|
||||||
|
if ($incAt) {
|
||||||
|
return in_array('disable', $this->identity) || $this->disable_at;
|
||||||
|
}
|
||||||
return in_array('disable', $this->identity);
|
return in_array('disable', $this->identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -291,6 +291,7 @@ class WebSocketDialog extends AbstractModel
|
|||||||
$data['email'] = $basic->email;
|
$data['email'] = $basic->email;
|
||||||
$data['userimg'] = $basic->userimg;
|
$data['userimg'] = $basic->userimg;
|
||||||
$data['bot'] = $basic->getBotOwner();
|
$data['bot'] = $basic->getBotOwner();
|
||||||
|
$data['is_disable'] = $basic->isDisable(true);
|
||||||
$data['quick_msgs'] = UserBot::quickMsgs($basic->email);
|
$data['quick_msgs'] = UserBot::quickMsgs($basic->email);
|
||||||
} else {
|
} else {
|
||||||
$data['name'] = 'non-existent';
|
$data['name'] = 'non-existent';
|
||||||
|
|||||||
@ -260,6 +260,9 @@
|
|||||||
<div v-if="isMute" class="chat-mute">
|
<div v-if="isMute" class="chat-mute">
|
||||||
{{$L('禁言发言')}}
|
{{$L('禁言发言')}}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="isDisable" class="chat-mute">
|
||||||
|
{{$L('此账号已停用')}}
|
||||||
|
</div>
|
||||||
<ChatInput
|
<ChatInput
|
||||||
v-else
|
v-else
|
||||||
ref="input"
|
ref="input"
|
||||||
@ -1126,6 +1129,10 @@ export default {
|
|||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isDisable() {
|
||||||
|
return this.dialogData.is_disable ?? false
|
||||||
|
},
|
||||||
|
|
||||||
quoteId() {
|
quoteId() {
|
||||||
if (this.msgId > 0) {
|
if (this.msgId > 0) {
|
||||||
return this.msgId
|
return this.msgId
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user