-
-
Notifications
You must be signed in to change notification settings - Fork 47
Member mute on conference #1048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
avoylenko
wants to merge
8
commits into
jambonz:main
Choose a base branch
from
avoylenko:fix-conference-mute
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bb5ea86
fix: member mute on conference
avoylenko 258f95d
Merge branch 'main' into fix-conference-mute
avoylenko cf2b076
Merge branch 'main' into fix-conference-mute
avoylenko 99fc8a7
Merge branch 'main' into fix-conference-mute
avoylenko dd0a276
Merge branch 'main' into fix-conference-mute
avoylenko bb67612
Merge branch 'main' into fix-conference-mute
avoylenko 8632bec
Merge branch 'main' into fix-conference-mute
avoylenko 931b171
Merge branch 'main' into fix-conference-mute
avoylenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why async when you are not awaiting on a promise anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It not true, we are attaching the catch block here:
jambonz-feature-server/lib/session/call-session.js
Line 1531 in 7fa0041
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't agree on this actually.
in line 1531 we call
task.mute
expecting to receive a Promise.however
mute()
currently doesnt return anythingit does call
doConferenceMute()
which returns nothing.The fact that we expect a Promise in line 1531 does not mean that the called function (
task.mute()
) needs to be declared async -- it can return a Promise without being declared async. It only needs to be declared async if it uses await.I prefer not to declare a function aysnc unless it uses await syntax within the function body. Let me know if you spot problems in my reasoning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davehorton you are 100% right, we don't need the async function here, but removing it will force us to change the mute function for dial verb. See
jambonz-feature-server/lib/tasks/dial.js
Line 336 in 8bed44c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra info, the mute function is being called here based on active task
jambonz-feature-server/lib/session/call-session.js
Line 1524 in 8bed44c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really dont see why that would force a change anywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
_lccMuteStatus
function calls themute
function based on session active task and since the function inside the dial task returns a promise(we have an await function there), we have to return a promise for the conference task as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davehorton do you need anything else or PR can be accepted?