From a32f3c3d48963e1a5184a497abe59b825678e155 Mon Sep 17 00:00:00 2001 From: torikizi Date: Sat, 6 Jan 2024 22:53:44 +0900 Subject: [PATCH 1/7] =?UTF-8?q?Forwarding=20Filter=20=E3=81=AB=20version?= =?UTF-8?q?=20=E3=81=A8=20metadata=20=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/sora/sora_signaling.h | 2 ++ src/sora_signaling.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/sora/sora_signaling.h b/include/sora/sora_signaling.h index 0721887c..76e1eb9f 100644 --- a/include/sora/sora_signaling.h +++ b/include/sora/sora_signaling.h @@ -115,6 +115,8 @@ struct SoraSignalingConfig { std::vector values; }; std::vector> rules; + boost::optional version; + boost::optional metadata; }; boost::optional forwarding_filter; diff --git a/src/sora_signaling.cpp b/src/sora_signaling.cpp index 7fd77953..fd0fc003 100644 --- a/src/sora_signaling.cpp +++ b/src/sora_signaling.cpp @@ -449,6 +449,13 @@ void SoraSignaling::DoSendConnect(bool redirect) { boost::json::object obj; auto& f = *config_.forwarding_filter; obj["action"] = f.action; + if (f.version) { + obj["version"] = *f.version; + } + + if (f.metadata) { + obj["metadata"] = *f.metadata; + } obj["rules"] = boost::json::array(); for (const auto& rules : f.rules) { boost::json::array ar; From 616517bdee4baf99a4bce283364a8efdffd59bc7 Mon Sep 17 00:00:00 2001 From: torikizi Date: Wed, 10 Jan 2024 23:31:58 +0900 Subject: [PATCH 2/7] =?UTF-8?q?CHANGES=20=E3=81=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 7e412c31..69ef3785 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,9 @@ ## develop +- [ADD] Forwarding Filter の項目に Version と metadata を追加 + - @torikizi + ## 2023.17.0 (2023-12-25) - [UPDATE] WebRTC を `m120.6099.1.2` に上げる From 73d69323f9d372f2e73b84a74689ae3b29d5dfcb Mon Sep 17 00:00:00 2001 From: torikizi Date: Thu, 11 Jan 2024 11:04:46 +0900 Subject: [PATCH 3/7] =?UTF-8?q?forwarding=20filter=20=E3=81=AE=E9=A0=85?= =?UTF-8?q?=E7=9B=AE=E3=81=AE=E9=A0=86=E7=95=AA=E3=82=92=E5=90=88=E3=82=8F?= =?UTF-8?q?=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sora_signaling.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sora_signaling.cpp b/src/sora_signaling.cpp index fd0fc003..aac716b8 100644 --- a/src/sora_signaling.cpp +++ b/src/sora_signaling.cpp @@ -449,13 +449,6 @@ void SoraSignaling::DoSendConnect(bool redirect) { boost::json::object obj; auto& f = *config_.forwarding_filter; obj["action"] = f.action; - if (f.version) { - obj["version"] = *f.version; - } - - if (f.metadata) { - obj["metadata"] = *f.metadata; - } obj["rules"] = boost::json::array(); for (const auto& rules : f.rules) { boost::json::array ar; @@ -471,6 +464,13 @@ void SoraSignaling::DoSendConnect(bool redirect) { } obj["rules"].as_array().push_back(ar); } + if (f.version) { + obj["version"] = *f.version; + } + + if (f.metadata) { + obj["metadata"] = *f.metadata; + } m["forwarding_filter"] = obj; } From 46994a5dd97eac388022599c53da65a28fd75285 Mon Sep 17 00:00:00 2001 From: torikizi Date: Fri, 12 Jan 2024 11:41:44 +0900 Subject: [PATCH 4/7] =?UTF-8?q?forwarding=20filter=20=E3=81=AE=20action=20?= =?UTF-8?q?=E3=82=82=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E9=A0=85?= =?UTF-8?q?=E7=9B=AE=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/sora/sora_signaling.h | 2 +- src/sora_signaling.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/sora/sora_signaling.h b/include/sora/sora_signaling.h index 76e1eb9f..ac33d0db 100644 --- a/include/sora/sora_signaling.h +++ b/include/sora/sora_signaling.h @@ -108,7 +108,7 @@ struct SoraSignalingConfig { std::vector data_channels; struct ForwardingFilter { - std::string action; + boost::optional action; struct Rule { std::string field; std::string op; diff --git a/src/sora_signaling.cpp b/src/sora_signaling.cpp index aac716b8..1b9029fa 100644 --- a/src/sora_signaling.cpp +++ b/src/sora_signaling.cpp @@ -448,7 +448,9 @@ void SoraSignaling::DoSendConnect(bool redirect) { if (config_.forwarding_filter) { boost::json::object obj; auto& f = *config_.forwarding_filter; - obj["action"] = f.action; + if (f.action) { + obj["action"] = *f.action; + } obj["rules"] = boost::json::array(); for (const auto& rules : f.rules) { boost::json::array ar; From 374c42b9a17d5393e582c1e39a0ece2c43e9af92 Mon Sep 17 00:00:00 2001 From: torikizi Date: Sat, 13 Jan 2024 21:52:04 +0900 Subject: [PATCH 5/7] =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=9D=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=81=A8=20CHANGES=20=E3=81=AE=E8=A8=98?= =?UTF-8?q?=E8=BC=89=E3=82=92=E8=A6=8B=E7=9B=B4=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 +++- src/sora_signaling.cpp | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 69ef3785..45a9473d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,7 +11,9 @@ ## develop -- [ADD] Forwarding Filter の項目に Version と metadata を追加 +- [ADD] Forwarding Filter の項目に Version と Metadata を追加 + - Version と Metadata はオプション項目として追加し、値がない場合は項目を設定しない + - 既存の Action も同様にオプション項目なので、値がない場合は項目を設定しないよう修正 - @torikizi ## 2023.17.0 (2023-12-25) diff --git a/src/sora_signaling.cpp b/src/sora_signaling.cpp index 1b9029fa..874dbd8f 100644 --- a/src/sora_signaling.cpp +++ b/src/sora_signaling.cpp @@ -469,7 +469,6 @@ void SoraSignaling::DoSendConnect(bool redirect) { if (f.version) { obj["version"] = *f.version; } - if (f.metadata) { obj["metadata"] = *f.metadata; } From efb75e91d391291a6117a2bc463963ed4621171e Mon Sep 17 00:00:00 2001 From: torikizi Date: Sun, 14 Jan 2024 14:09:35 +0900 Subject: [PATCH 6/7] =?UTF-8?q?CHANGES=20=E3=81=AE=E8=AA=AC=E6=98=8E?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 45a9473d..8cce2eee 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,9 +11,12 @@ ## develop +- [CHANGE] Forwarding Filter の Action をオプション項目にする + - 必須項目からオプション項目に変更となるため、破壊的変更となる + - オプション項目なので、値がない場合は項目を設定しない + - @torikizi - [ADD] Forwarding Filter の項目に Version と Metadata を追加 - Version と Metadata はオプション項目として追加し、値がない場合は項目を設定しない - - 既存の Action も同様にオプション項目なので、値がない場合は項目を設定しないよう修正 - @torikizi ## 2023.17.0 (2023-12-25) From 59068440dd0a08e98dc886928b06f8a3581b8781 Mon Sep 17 00:00:00 2001 From: torikizi Date: Mon, 15 Jan 2024 17:16:24 +0900 Subject: [PATCH 7/7] =?UTF-8?q?CHANGES=20=E3=81=AE=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8cce2eee..13480c09 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,9 +11,7 @@ ## develop -- [CHANGE] Forwarding Filter の Action をオプション項目にする - - 必須項目からオプション項目に変更となるため、破壊的変更となる - - オプション項目なので、値がない場合は項目を設定しない +- [FIX] Forwarding Filter の Action 項目は本来オプション項目だったが、 action は `std::optional` 型になっていなかったため修正 - @torikizi - [ADD] Forwarding Filter の項目に Version と Metadata を追加 - Version と Metadata はオプション項目として追加し、値がない場合は項目を設定しない