@pusher/chatkit-server
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -10,2 +10,6 @@ # Changelog | ||
## [1.0.4](https://github.com/pusher/chatkit-server-node/compare/1.0.3...1.0.4) | ||
- `CreateRoom` and `UpdateRoom` both now support the `customData` option. | ||
## [1.0.3](https://github.com/pusher/chatkit-server-node/compare/1.0.2...1.0.3) - 2018-11-06 | ||
@@ -12,0 +16,0 @@ |
{ | ||
"name": "@pusher/chatkit-server", | ||
"description": "Pusher Chatkit server SDK", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "target/src/index.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
{ | ||
"name": "@pusher/chatkit-server", | ||
"description": "Pusher Chatkit server SDK", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "target/src/index.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -138,2 +138,3 @@ import { AuthenticateOptions, AuthenticatePayload, AuthenticationResponse, BaseClient, Instance, TokenWithExpiry } from '@pusher/platform-node'; | ||
userIds?: Array<string>; | ||
customData?: object; | ||
} | ||
@@ -144,2 +145,3 @@ export interface UpdateRoomOptions { | ||
isPrivate?: boolean; | ||
customData?: object; | ||
} | ||
@@ -146,0 +148,0 @@ export interface DeleteRoomOptions { |
@@ -266,3 +266,3 @@ "use strict"; | ||
}); | ||
const { name, isPrivate, userIds } = options; | ||
const { name, isPrivate, userIds, customData } = options; | ||
let roomPayload = { | ||
@@ -275,2 +275,5 @@ name, | ||
} | ||
if (customData) { | ||
roomPayload.custom_data = customData; | ||
} | ||
return this.apiInstance.request({ | ||
@@ -293,2 +296,5 @@ method: 'POST', | ||
} | ||
if (options.customData) { | ||
body.custom_data = options.customData; | ||
} | ||
return this.apiInstance.request({ | ||
@@ -295,0 +301,0 @@ method: 'PUT', |
Sorry, the diff of this file is not supported yet
55502
765