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

Updated PubNub Js sdk containing membership type. #325

Merged
merged 11 commits into from
Jan 7, 2025

Conversation

marcin-cebo
Copy link
Contributor

@marcin-cebo marcin-cebo commented Dec 19, 2024

fix: Added validation for Leave and Heartbeat

Added validation for Leave and Heartbeat to ensure user receives an error when providing empty strings for channels or groups.

refactor: Internal refactor

Comment on lines 723 to 732
this.include = createJsObject<PubNubJs.MembershipIncludeOptions> {
this.customFields = include.includeCustom
this.totalCount = include.includeTotalCount
this.channelFields = include.includeChannel
this.customChannelFields = include.includeChannelCustom
this.channelTypeField = include.includeChannelType
this.channelStatusField = include.includeChannelStatus
this.statusField = include.includeStatus
this.typeField = include.includeType
}
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps we could extract this into a function like MembershipInclude.toMembershipIncludeOptions() if it's used in a few places

Comment on lines 1048 to 1057
this.include = createJsObject<PubNubJs.IncludeOptions> {
this.totalCount = include.includeTotalCount
this.customFields = include.includeCustom
this.UUIDFields = include.includeUser
this.customUUIDFields = include.includeUserCustom
this.UUIDTypeField = include.includeUserType
this.UUIDStatusField = include.includeUserStatus
this.statusField = include.includeStatus
this.typeField = include.includeType
}
Copy link
Contributor

Choose a reason for hiding this comment

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

same - extract to a function?

In KMP js implemented new Memberships and ChannelMembers methods containing possibility to specify membership type and all optional data returned by API using include parameters.
@marcin-cebo marcin-cebo force-pushed the mc/membrshipType_in_KMP_core2 branch from 8b2a961 to d823d6d Compare January 2, 2025 14:38
@marcin-cebo
Copy link
Contributor Author

@pubnub-release-bot release kotlin as v10.3.3

@marcin-cebo
Copy link
Contributor Author

@pubnub-release-bot release kotlin as v10.3.3

@marcin-cebo marcin-cebo merged commit 5779f48 into master Jan 7, 2025
6 checks passed
@marcin-cebo marcin-cebo deleted the mc/membrshipType_in_KMP_core2 branch January 7, 2025 12:18
@pubnub-release-bot
Copy link
Contributor

🚀 Release successfully completed 🚀

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.

4 participants