Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #68 +/- ##
==========================================
- Coverage 84.02% 83.59% -0.43%
==========================================
Files 35 36 +1
Lines 507 512 +5
==========================================
+ Hits 426 428 +2
- Misses 81 84 +3
Continue to review full report in Codecov by Sentry.
|
roznawsk
approved these changes
Aug 11, 2023
| @spec add_peer(id(), Peer.peer()) :: {:ok, Peer.t()} | {:error, :reached_peers_limit} | ||
| def add_peer(room_id, peer_type) do | ||
| GenServer.call(registry_id(room_id), {:add_peer, peer_type}) | ||
| @spec add_peer(id(), Peer.peer(), map() | nil) :: |
Member
There was a problem hiding this comment.
I am wondering, whether the options shouldn't have a defined type instead of just map.
I'm not saying that we necessarily need this new type tho
Member
Author
There was a problem hiding this comment.
Could be, but I think I'll leave it as-is ¯_(ツ)_/¯
roznawsk
approved these changes
Aug 11, 2023
| GenServer.call(registry_id(room_id), {:add_peer, peer_type}) | ||
| @spec add_peer(id(), Peer.peer(), map() | nil) :: | ||
| {:ok, Peer.t()} | :error | {:error, :reached_peers_limit} | ||
| def add_peer(room_id, peer_type, options) do |
Member
There was a problem hiding this comment.
Suggested change
| def add_peer(room_id, peer_type, options) do | |
| def add_peer(room_id, peer_type, options \\ %{}) do |
| network_options: state.network_options, | ||
| video_codec: state.config.video_codec | ||
| }, | ||
| if(is_nil(options), do: %{}, else: options) |
Member
There was a problem hiding this comment.
Suggested change
| if(is_nil(options), do: %{}, else: options) | |
| options |
e520ffc to
2271cdc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: