From c33c06176bd47b0fbc84db88930ad35225f84003 Mon Sep 17 00:00:00 2001 From: youngq Date: Wed, 26 Feb 2025 14:48:00 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=8C=87=E4=BB=A4=E5=87=BD=E6=95=B0=202.?= =?UTF-8?q?=E5=85=A8=E5=91=98=E8=A7=82=E7=9C=8B=E9=87=8D=E5=A4=8D=E8=B0=83?= =?UTF-8?q?=E7=94=A8=EF=BC=8C=E5=8F=AA=E9=80=9A=E7=9F=A5=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=86=99=E5=85=A5redis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Frontend/RoomController.cs | 3 ++- WGShare.API/Hubs/IMessageClient.cs | 2 +- WGShare.API/Hubs/SessionManageHub.cs | 4 ++-- WGShare.API/WGShare.API.xml | 16 ++++++++++++++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/WGShare.API/Controllers/Frontend/RoomController.cs b/WGShare.API/Controllers/Frontend/RoomController.cs index 491c4ae..7556f42 100644 --- a/WGShare.API/Controllers/Frontend/RoomController.cs +++ b/WGShare.API/Controllers/Frontend/RoomController.cs @@ -414,7 +414,8 @@ namespace WGShare.API.Controllers.Frontend if (RedisHelper.Instance.HGet(RedisKeyConstant.SessionManage.GetChannelShowUserKey(TenantId), roomNum) == uid) { - // 如果已经是全员观看他了,则不做处理 + // 如果已经是全员观看他了, 直接通知其他房间用户 + await _hubContext.Clients.Group(roomNum).ShowUser(uid, uname, UId, UserName); return; } // 设置房间全员观看用户 diff --git a/WGShare.API/Hubs/IMessageClient.cs b/WGShare.API/Hubs/IMessageClient.cs index 8aa358d..822a8aa 100644 --- a/WGShare.API/Hubs/IMessageClient.cs +++ b/WGShare.API/Hubs/IMessageClient.cs @@ -47,7 +47,7 @@ namespace WGShare.API.Hubs /// /// /// - Task Operation(int type); + Task Operation(string contentString); /// /// 更新视图 diff --git a/WGShare.API/Hubs/SessionManageHub.cs b/WGShare.API/Hubs/SessionManageHub.cs index f1f000a..accdf9d 100644 --- a/WGShare.API/Hubs/SessionManageHub.cs +++ b/WGShare.API/Hubs/SessionManageHub.cs @@ -293,9 +293,9 @@ namespace WGShare.API.Hubs /// /// [HubMethodName("sendOper")] - public async Task SendOperation(string roomNum, int type) + public async Task SendOperation(string roomNum, string contentString) { - await Clients.Group(roomNum).Operation(type); + await Clients.Group(roomNum).Operation(contentString); } /// diff --git a/WGShare.API/WGShare.API.xml b/WGShare.API/WGShare.API.xml index 4766f06..b62a0f5 100644 --- a/WGShare.API/WGShare.API.xml +++ b/WGShare.API/WGShare.API.xml @@ -311,6 +311,12 @@ + + + 共享人取消共享屏幕 + + + 分享上传文件 @@ -613,7 +619,7 @@ - + 客户端操作 @@ -632,6 +638,12 @@ + + + 共享人取消共享屏幕 + + + 用户加入频道回调 @@ -772,7 +784,7 @@ - + 发送客户端指令