Add VIP presence themes and custom greetings

This commit is contained in:
2026-04-11 15:44:30 +08:00
parent 9fb7710079
commit 4eba9dfc12
21 changed files with 1126 additions and 49 deletions
+14
View File
@@ -35,6 +35,8 @@ class User extends Authenticatable
'email',
'sex',
'sign',
'custom_join_message',
'custom_leave_message',
'user_level',
'inviter_id',
'room_id',
@@ -197,6 +199,18 @@ class User extends Authenticatable
return $this->vipLevel?->icon ?? '';
}
/**
* 判断用户当前是否允许自定义会员进退场语句。
*/
public function canCustomizeVipPresence(): bool
{
if (! $this->isVip()) {
return false;
}
return (bool) $this->vipLevel?->allow_custom_messages;
}
/**
* 关联:当前用户的 VIP 购买订单记录
*/