From d91ed81f1fa6493ae47c003a173a511ffe158eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wala?= Date: Mon, 15 May 2023 12:32:22 +0200 Subject: [PATCH] Fix README example, add docs to Proto structs --- README.md | 5 ++++- compile_proto.sh | 2 +- protos | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5a8260d..5b9e39f 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,16 @@ room_id {:ok, %Jellyfish.Peer{id: peer_id}, peer_token} = Jellyfish.Room.add_peer(client, room_id, Jellyfish.Peer.WebRTC) receive do - {:jellyfish, {:peer_connected, ^room_id, ^peer_id}} -> # handle the notification + {:jellyfish, %Jellyfish.Server.ControlMessage.PeerConnected{room_id: ^room_id, peer_id: ^peer_id} -> + # handle the notification end # Delete peer :ok = Jellyfish.Room.delete_peer(client, room_id, peer_id) ``` +List of structs representing server notifications can be found in [generated Protobuf file](lib/protos/jellyfish/server_notifications.pb.ex). + ## Copyright and License Copyright 2023, [Software Mansion](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=jellyfish) diff --git a/compile_proto.sh b/compile_proto.sh index cad7303..0267680 100755 --- a/compile_proto.sh +++ b/compile_proto.sh @@ -21,4 +21,4 @@ for file in $files; do count=$(($count + 1)) done -mix format "lib/protos/**/*.ex" \ No newline at end of file +mix format "lib/protos/**/*.ex" diff --git a/protos b/protos index f378596..da12bef 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit f378596eac47f409e1bb5637cc8812ff0ee1404e +Subproject commit da12befd695ce6fe0e212acf70a1d1f97572e2ef