From c89e9806c2d8b8bfcad3c2aae5245a3d1fafa69a Mon Sep 17 00:00:00 2001 From: hujiebin Date: Tue, 13 Jun 2023 14:25:04 +0800 Subject: [PATCH] =?UTF-8?q?mic=E4=BD=8D=E7=BD=AE=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/model/group_m/micData.go | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/domain/model/group_m/micData.go b/domain/model/group_m/micData.go index a7077bf..e3df977 100644 --- a/domain/model/group_m/micData.go +++ b/domain/model/group_m/micData.go @@ -398,16 +398,26 @@ func getMicIContent(model *domain.Model, groupId string, i int) (MicContent, err if err != nil { return MicContent{}, err } + var micEffect string + var headwearIcon string + if micUser.CpUserId > 0 { + if cpUser, _ := user_m.GetUser(model, micUser.CpUserId); cpUser != nil { + headwearIcon = cpUser.Avatar + } + micEffect = "https://image.whoisamy.shop/hilo/manager/b44eef9674524451b9aa4ba6d34540e9.svga" // todo ui + } return MicContent{ - GroupId: txGroupId, - I: mic.I, - Lock: mic.Lock, - Forbid: micUser.Forbid, - MicForbid: mic.MicForbid, - ExternalId: micUser.ExternalId, - AgoraId: uint32(micUser.UserId), - Timestamp: time.Now().UnixNano(), - User: micUserData, + GroupId: txGroupId, + I: mic.I, + Lock: mic.Lock, + Forbid: micUser.Forbid, + MicForbid: mic.MicForbid, + ExternalId: micUser.ExternalId, + AgoraId: uint32(micUser.UserId), + Timestamp: time.Now().UnixNano(), + User: micUserData, + MicEffect: micEffect, + HeadwearIcon: headwearIcon, }, nil } -- 2.22.0