Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Oct 1, 2024
1 parent f13c5ad commit d03e2e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/models/user_modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func (m *UserModel) RemoveParticipant(r *plugnmeet.RemoveParticipantReq) error {
status, err := m.natsService.GetRoomUserStatus(r.RoomId, r.UserId)
if err != nil {
log.Errorln(fmt.Sprintf("error GetRoomUserStatus to %s; roomId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
log.Errorln(fmt.Sprintf("error GetRoomUserStatus roomId %s; userId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
return err
}

Expand All @@ -28,20 +28,20 @@ func (m *UserModel) RemoveParticipant(r *plugnmeet.RemoveParticipantReq) error {
// send notification to be disconnected
err = m.natsService.BroadcastSystemEventToRoom(plugnmeet.NatsMsgServerToClientEvents_SESSION_ENDED, r.GetRoomId(), "notifications.room-disconnected-participant-removed", &r.UserId)
if err != nil {
log.Errorln(fmt.Sprintf("error broadcasting SESSION_ENDED event to %s; roomId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
log.Errorln(fmt.Sprintf("error broadcasting SESSION_ENDED event roomId %s; userId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
}

// now remove from lk
_, err = m.lk.RemoveParticipant(r.RoomId, r.UserId)
if err != nil {
log.Errorln(fmt.Sprintf("error removing user from lk to %s; roomId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
log.Errorln(fmt.Sprintf("error removing user from lk roomId %s; userId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
}

// finally, check if requested to block as well as
if r.BlockUser {
_, err = m.natsService.AddUserToBlockList(r.RoomId, r.UserId)
if err != nil {
log.Errorln(fmt.Sprintf("error AddUserToBlockList to %s; roomId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
log.Errorln(fmt.Sprintf("error AddUserToBlockList roomId %s; userId: %s; msg: %s", r.GetRoomId(), r.GetUserId(), err))
}
}

Expand Down

0 comments on commit d03e2e1

Please sign in to comment.