Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Nov 3, 2023
1 parent 8745318 commit a652b09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkg/models/room_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ func (am *RoomAuthModel) CreateRoom(r *plugnmeet.CreateRoomReq) (bool, string, *
return false, "Error: " + err.Error(), nil
}

// we'll silently add metadata into our redis
// we can avoid errors (if occur) because it will update from webhook too
_, _ = am.rs.ManageActiveRoomsWithMetadata(r.RoomId, "add", meta)

return true, "room created", room
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/models/room_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func (r *RoomService) ManageActiveRoomsWithMetadata(roomId, task, metadata strin
return nil, err
}
case "del":
r.rc.HDel(r.ctx, ActiveRoomsWithMetadataKey, roomId).Result()
_, err = r.rc.HDel(r.ctx, ActiveRoomsWithMetadataKey, roomId).Result()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a652b09

Please sign in to comment.