Skip to content
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

[4.3] - DUPT-193: Make conference websocket events more granular #6603

Merged
merged 5 commits into from
Jul 8, 2020

Conversation

mk1s
Copy link
Contributor

@mk1s mk1s commented Jul 6, 2020

This PR Addresses a bug where the newly introduced granular subscriptions were passing the legacy binding thru and rewriting into the newer binding string.

Example:

...
auth_token: sessionStorage.getItem('auth_token'),
	    	        	  data: {
	    	        	  	account_id: data.data.account_id,
	    	        	  	binding: 'conference.event.b05d601a69718090248aec40ee8e049d.*'
	    	        	  }

was rewriting to conference.event.b05d601a69718090248aec40ee8e049d.*.*

John White added 3 commits June 30, 2020 11:07
- create telemetry consensus function
- filter telemetry node_info from status
- Restore legacy binding logic as legacy binding strings were getting rewritten
@mk1s mk1s marked this pull request as ready for review July 7, 2020 12:32
Copy link
Member

@lazedo lazedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing mandatory, just suggestions

Comment on lines 97 to 98
Subscribed = [?ACCOUNT_BINDING(AccountId, ConferenceId, CallId)],
Listeners = [{'amqp', 'conference', event_binding_options(AccountId, ConferenceId, CallId)}],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Subscribed = [?ACCOUNT_BINDING(AccountId, ConferenceId, CallId)],
Listeners = [{'amqp', 'conference', event_binding_options(AccountId, ConferenceId, CallId)}],
Subscribed = [?ACCOUNT_BINDING(AccountId, ConferenceId, CallId, ?ALL)],
Listeners = [{'amqp', 'conference', event_binding_options(AccountId, ConferenceId, CallId, ?ALL)}],

Comment on lines 128 to 138
-spec event_binding_options(kz_term:ne_binary(), kz_term:ne_binary(), kz_term:ne_binary()) -> kz_term:proplist().
event_binding_options(AccountId, ConferenceId, CallId) ->
[{'restrict_to', [{'event', [{'account_id', AccountId}
,{'conference_id', ConferenceId}
,{'call_id', CallId}
]
}]
}
,'federate'
].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed if ?ALL is used above

@lazedo lazedo merged commit 6deeab2 into 4.3 Jul 8, 2020
@lazedo lazedo deleted the DUPT-193-4.3 branch July 8, 2020 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants