From 1835f70b237d727945ff72afbf011899b82c6b19 Mon Sep 17 00:00:00 2001 From: Muihd <1083092844@qq.com> Date: Wed, 30 Apr 2025 22:52:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20msg.Owner=20=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BarrageGrab/Server/WsBarrageServer.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/BarrageGrab/Server/WsBarrageServer.cs b/BarrageGrab/Server/WsBarrageServer.cs index 68c94c5..31276fa 100644 --- a/BarrageGrab/Server/WsBarrageServer.cs +++ b/BarrageGrab/Server/WsBarrageServer.cs @@ -291,14 +291,18 @@ namespace BarrageGrab var roomInfo = AppRuntime.RoomCaches.GetCachedWebRoomInfo(msg.RoomId.ToString()); if (roomInfo == null) return; - msg.Owner = new RoomAnchorInfo() + if (roomInfo.Owner != null) { - Nickname = roomInfo.Owner.Nickname, - HeadUrl = roomInfo.Owner.HeadUrl, - FollowStatus = roomInfo.Owner.FollowStatus, - SecUid = roomInfo.Owner.SecUid, - UserId = roomInfo.Owner.UserId - }; + msg.Owner = new RoomAnchorInfo() + { + Nickname = roomInfo.Owner.Nickname, + HeadUrl = roomInfo.Owner.HeadUrl, + FollowStatus = roomInfo.Owner.FollowStatus, + SecUid = roomInfo.Owner.SecUid, + UserId = roomInfo.Owner.UserId + }; + } + if (msg.WebRoomId.IsNullOrWhiteSpace()) {