Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 89f696d

Browse files
feat(lib): fix custom fields not being appeneded to the hook return v… (#109)
* feat(lib): fix custom fields not being appeneded to the hook return value * feat(lib): rm a log * PubNub SDK v0.21.0 release. --------- Co-authored-by: PubNub Release Bot <[email protected]>
1 parent cbef39e commit 89f696d

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

.pubnub.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
---
22
name: pubnub-react-chat-components
3-
version: v0.20.0
3+
version: v0.21.0
44
scm: github.com/pubnub/react-chat-components
55
schema: 1
66
files:
77
- lib/dist/index.js
88
- lib/dist/index.es.js
99
changelog:
10+
- date: 2023-03-27
11+
version: v0.21.0
12+
changes:
13+
- type: feature
14+
text: "UseUserMemberships hook - fix custom fields not being appended to the hook return value."
1015
- date: 2023-01-17
1116
version: v0.20.0
1217
changes:

packages/common/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pubnub/common-chat-components",
3-
"version": "0.20.0",
3+
"version": "0.21.0",
44
"main": "src/index.ts",
55
"license": "MIT",
66
"scripts": {

packages/common/src/hooks/use-user-memberships.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,16 @@ export const useUserMemberships = (options: GetMembershipsParametersv2 = {}): Ho
5353
setDoFetch(false);
5454
setChannels((channels) => [
5555
...channels,
56-
...(response.data.map((m) => m.channel) as ChannelEntity[]),
56+
...(response.data.map((m) => {
57+
if (m.custom) {
58+
return {
59+
...m.channel,
60+
custom: m.custom,
61+
};
62+
}
63+
64+
return m.channel;
65+
}) as ChannelEntity[]),
5766
]);
5867
setTotalCount(response.totalCount);
5968
setPage(response.next);

packages/react-native/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pubnub/react-native-chat-components",
3-
"version": "0.20.0",
3+
"version": "0.21.0",
44
"description": "PubNub Chat Components is a development kit of React Native components that aims to help you to easily build Chat applications using PubNub infrastructure. It removes the complexicity of picking an adequate Chat engine, learning its APIs and dealing with its low-level internals. As the same time it allows you to create apps of various use cases, with different functionalities and customizable looks.",
55
"author": "PubNub <[email protected]>",
66
"main": "dist/commonjs/index",

packages/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pubnub/react-chat-components",
3-
"version": "0.20.0",
3+
"version": "0.21.0",
44
"description": "PubNub Chat Components is a development kit of React components that aims to help you to easily build Chat applications using PubNub infrastructure. It removes the complexicity of picking an adequate Chat engine, learning its APIs and dealing with its low-level internals. As the same time it allows you to create apps of various use cases, with different functionalities and customizable looks.",
55
"author": "PubNub <[email protected]>",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)