Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 30, 2024
1 parent 97906b8 commit 73a467f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/models/nats_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (m *NatsModel) RenewPNMToken(roomId, userId, token string) {

err = m.natsService.BroadcastSystemEventToRoom(plugnmeet.NatsMsgServerToClientEvents_RESP_RENEW_PNM_TOKEN, roomId, token, &userId)
if err != nil {
log.Errorln(fmt.Errorf("error renewing pnm token to %s; roomId: %s; msg: %s", userId, roomId, err.Error()))
log.Errorln(fmt.Errorf("error renewing pnm token for %s; roomId: %s; msg: %s", userId, roomId, err.Error()))
}
}

Expand All @@ -46,6 +46,6 @@ func (m *NatsModel) HandleClientPing(roomId, userId string) {

err := m.natsService.UpdateUserKeyValue(roomId, userId, natsservice.UserLastPingAt, fmt.Sprintf("%d", time.Now().UnixMilli()))
if err != nil {
log.Errorln(fmt.Sprintf("error updating user last ping to %s; roomId: %s; msg: %s", userId, roomId, err.Error()))
log.Errorln(fmt.Sprintf("error updating user last ping for %s; roomId: %s; msg: %s", userId, roomId, err.Error()))
}
}
4 changes: 2 additions & 2 deletions pkg/models/nats_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (m *NatsModel) OnAfterUserJoined(roomId, userId string) {

err = m.natsService.UpdateUserStatus(roomId, userId, natsservice.UserStatusOnline)
if err != nil {
log.Warnln(fmt.Sprintf("Error updating user status to %s; roomId: %s; msg: %s", userId, roomId, err.Error()))
log.Warnln(fmt.Sprintf("Error updating user status: %s for %s; roomId: %s; msg: %s", natsservice.UserStatusOnline, userId, roomId, err.Error()))
}

if userInfo, err := m.natsService.GetUserInfo(roomId, userId); err == nil && userInfo != nil {
Expand Down Expand Up @@ -71,7 +71,7 @@ func (m *NatsModel) OnAfterUserDisconnected(roomId, userId string) {
}
err := m.natsService.UpdateUserStatus(roomId, userId, natsservice.UserStatusOffline)
if err != nil {
log.Warnln(err)
log.Warnln(fmt.Sprintf("Error updating user status: %s for %s; roomId: %s; msg: %s", natsservice.UserStatusOffline, userId, roomId, err.Error()))
}

// analytics
Expand Down
4 changes: 2 additions & 2 deletions pkg/models/nats_user_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func (m *NatsModel) HandleInitialData(roomId, userId string) {
// send room info
rInfo, err := m.natsService.GetRoomInfo(roomId)
if err != nil {
log.Errorln(fmt.Sprintf("error getting room info userId: %s, roomId: %s, msg: %s", userId, roomId, err.Error()))
log.Errorln(fmt.Sprintf("error getting room info for userId: %s, roomId: %s, msg: %s", userId, roomId, err.Error()))
_ = m.natsService.NotifyErrorMsg(roomId, err.Error(), &userId)
return
}
Expand All @@ -22,7 +22,7 @@ func (m *NatsModel) HandleInitialData(roomId, userId string) {
// send this user's info
userInfo, err := m.natsService.GetUserInfo(roomId, userId)
if err != nil {
log.Errorln(fmt.Sprintf("error getting user info userId: %s, roomId: %s, msg: %s", userId, roomId, err.Error()))
log.Errorln(fmt.Sprintf("error getting user info for userId: %s, roomId: %s, msg: %s", userId, roomId, err.Error()))
_ = m.natsService.NotifyErrorMsg(roomId, err.Error(), &userId)
return
}
Expand Down

0 comments on commit 73a467f

Please sign in to comment.