Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-group
Commits
8398ada6
Commit
8398ada6
authored
Aug 15, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
踢人出房
parent
976dff94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
micData.go
domain/model/group_m/micData.go
+3
-1
room.go
domain/model/group_m/room.go
+1
-1
group_setting.go
route/group_r/group_setting.go
+4
-0
No files found.
domain/model/group_m/micData.go
View file @
8398ada6
...
...
@@ -68,7 +68,7 @@ type MicNumChangeContent struct {
Timestamp
int64
`json:"timestamp"`
}
func
MicGroupKickOutRPush
(
model
*
domain
.
Model
,
groupUid
string
,
userExternalId
string
,
beKickExternalId
string
)
{
func
MicGroupKickOutRPush
(
model
*
domain
.
Model
,
groupUid
string
,
userExternalId
string
,
beKickExternalId
string
,
beKickuserId
uint64
)
{
model
.
Log
.
Infof
(
"MicChangeRPush MicGroupKickOutRPush begin groupUuid:%v"
,
groupUid
)
txGroupId
,
err
:=
ToTxGroupId
(
model
,
groupUid
)
...
...
@@ -94,6 +94,8 @@ func MicGroupKickOutRPush(model *domain.Model, groupUid string, userExternalId s
model
.
Log
.
Errorf
(
"MicChangeRPush MicGroupKickOutRPush Marshal MicSystemMsg err:%+v, groupUuid:%v, micContent:%+v"
,
err
,
groupUid
,
string
(
str
))
return
}
// socket通知被拉黑者退房
rpc
.
SendQuitRoom
(
beKickuserId
)
if
n
,
err
:=
redisCli
.
GetRedis
()
.
RPush
(
context
.
Background
(),
redis_key
.
GetMicInfoChange
(),
string
(
str
))
.
Result
();
err
!=
nil
||
n
==
0
{
model
.
Log
.
Errorf
(
"MicChangeRPush MicGroupKickOutRPush err:%+v, groupUuid:%v, micContent:%+v"
,
err
,
groupUid
,
string
(
str
))
return
...
...
domain/model/group_m/room.go
View file @
8398ada6
...
...
@@ -208,7 +208,7 @@ func RoomLivingLeaveByKick(model *domain.Model, groupUuid string, beKickuserId u
Target: beKickExternalId,
}, false)*/
MicGroupKickOutRPush
(
model
,
groupUuid
,
userExternalId
,
beKickExternalId
)
MicGroupKickOutRPush
(
model
,
groupUuid
,
userExternalId
,
beKickExternalId
,
beKickuserId
)
return
roomLivingLeave
(
model
,
beKickuserId
,
groupUuid
)
}
...
...
route/group_r/group_setting.go
View file @
8398ada6
...
...
@@ -522,6 +522,8 @@ func AddGroupBlacklist(c *gin.Context) (*mycontext.MyContext, error) {
if
err
==
nil
{
signal_s
.
SendCustomMsg
(
model
,
groupId
,
nil
,
string
(
buf
))
}
// socket通知被拉黑者退房
rpc
.
SendQuitRoom
(
user
.
ID
)
if
err
=
group_s
.
NewGroupService
(
myContext
)
.
LeaveGroup
(
model
,
groupId
,
user
.
ID
,
externalId
);
err
!=
nil
{
return
myContext
,
err
...
...
@@ -750,6 +752,8 @@ func KickGroupMembers(c *gin.Context) (*mycontext.MyContext, error) {
Source
:
myExtId
,
Target
:
externalId
,
Content
:
string
(
buf
)}
signal_s
.
SendSignalMsg
(
model
,
groupId
,
systemMsg
,
false
)
}
// socket通知被拉黑者退房
rpc
.
SendQuitRoom
(
user
.
ID
)
if
err
=
group_s
.
NewGroupService
(
myContext
)
.
LeaveGroup
(
model
,
groupId
,
user
.
ID
,
externalId
);
err
!=
nil
{
return
myContext
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment