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.
This pull request introduces significant enhancements and refactoring to the messaging functionality in the Sora Python SDK. Key changes include the addition of a new
send_message()
method, updates to the internal handling of data channels, and the introduction of new tests to verify messaging capabilities.Enhancements to Messaging Functionality:
tests/client.py
: Introduced newsend_message()
andrecv_message()
methods to handle messaging over data channels, replacing the previoussend()
method. Added internal dictionaries to manage data channel events and message queues. ([[1]](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-479c8981e6ebf1364a8e3e84d8fb328ce5bcd517560c6470750a9a3de67133d3L101-R102)
,[[2]](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-479c8981e6ebf1364a8e3e84d8fb328ce5bcd517560c6470750a9a3de67133d3L202-R212)
,[[3]](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-479c8981e6ebf1364a8e3e84d8fb328ce5bcd517560c6470750a9a3de67133d3R370-R371)
,[[4]](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-479c8981e6ebf1364a8e3e84d8fb328ce5bcd517560c6470750a9a3de67133d3R393-R398)
)Documentation Updates:
CHANGES.md
: Documented the addition of thesend_message()
method and its relationship withon_message()
andsend_data_channel()
. ([CHANGES.mdR19-R22](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-d975bf659606195d2165918f93e1cf680ef68ea3c9cab994f033705fea8238b2R19-R22)
)Configuration Updates:
.env.template
: Added a newTEST_API_URL
configuration entry. ([.env.templateR22](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-749e06f64632f62a0c0dfbf4c4f3850e27e94ac109aa121fabd5c29469ae88deR22)
)Test Enhancements:
tests/test_messaging.py
: Updated existing tests to use the newsend_message()
method. ([tests/test_messaging.pyL49-R50](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-f1780694c9953ba3f3d9883334be0517587a8194246078dc5d0a5ba720a96cf9L49-R50)
)tests/test_messaging_header.py
: Added a new test to verify messaging with headers, ensuring data channels are correctly established and messages are sent and received as expected. ([tests/test_messaging_header.pyR1-R88](https://github.com/shiguredo/sora-python-sdk/pull/107/files#diff-5c80970c9d4996ac62f9575ba92749ced7cb2437d056f54be5ef7490affff592R1-R88)
)