All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Update mixin-deep and set-value for security fixes
- Adds message editing via
edit{Simple,Multipart,}Message.
- Support for fetching a message by its message ID, via
fetchMultipartMessage.
- Fix
updateRoomprivacy not updating whenisPrivatevalue isfalse
- Support for
PushNotificationTitleOverrideattribute in the Room model
- Bump minimum lodash version for security concerns
- Don't send unnecessary query parameters in fetch messages methods
- Support for user specified room IDs. Provide an
idparameter to thecreateRoommethod.
- The
deleteMessagemethod now requires a room ID parameter,roomID, and theidparameter has been renamed tomessageIdto avoid ambiguity.
1.3.0 - 2019-06-24
- Unread counts. No new methods are added, but
getUserRoomsnow includeunread_countandlast_message_atin the response
- Async deletion methods.
asyncDeleteUser,getDeleteUserStatus,asyncDeleteRoom,getDeleteRoomStatus. ThedeleteRoomanddeleteUsermethods should be considered deprecated, and will be removed in a future version.
- Multipart message support:
sendSimpleMessage,sendMultipartMessage,fetchMultipartMessagesall deal in the multipart message format.
- Keep HTTP connections alive.
- Upgrade dependencies to avoid vulnerabilities
CreateRoomandUpdateRoomboth now support thecustomDataoption.
1.0.3 - 2018-11-06
- Update pusher platform node dependency for vulnerabilities in transient deps
- Bump pusher-platform-node dependency to 0.15.0
- Clean up npm package to only include what is necessary
- 1.0.0 was published empty, so 1.0.1 is an identical release, but not empty
- room IDs are now strings
getUsersByIdsis nowgetUsersByIdGetUsersByIdsOptionsis nowGetUsersByIdOptions- Every mention of
roleNameis now justname
getRoom,getRoomsandgetRoomMessagesno longer require auserIdgetRoomsnow takesincludePrivateandfromIDparameters for looking up private rooms and paginating by ID
- The following new methods:
getUsersendMessagedeleteMessageupdateRoomdeleteRoomaddUsersToRoomremoveUsersFromRoomsetReadCursorgetReadCursorgetReadCursorsForUsergetReadCursorsForRoomcursorsRequest
See the documentation for details on usage.
0.12.2 - 2018-07-23
- Bump jsonwebtoken dependency to 8.3.0
0.12.1 - 2018-04-24
- The package name has been changed to
@pusher/chatkit-server
0.12.0 - 2018-04-23
- Bump pusher-platform-node dependency to 0.13.0
authenticatenow returns an object like this:
{
"status": 200,
"headers": {
"Some-Header": "some-value"
},
"body": {
"access_token": "an.access.token",
"token_type": "bearer",
"expires_in": 86400
}
}where:
statusis the suggested HTTP response status code,headersare the suggested response headers,bodyholds the token payload.
If there's an error with the authentication process then the return value will be the same but with a different body. For example:
{
"status": 422,
"headers": {
"Some-Header": "some-value"
},
"body": {
"error": "token_provider/invalid_grant_type",
"error_description": "The grant_type provided, some-invalid-grant-type, is unsupported"
}
}- Authentication no longer returns refresh tokens.
If your client devices are running the:
- Swift SDK - (breaking change) you must be using version
>= 0.8.0of chatkit-swift. - Android SDK - you won't be affected regardless of which version you are running.
- JS SDK - you won't be affected regardless of which version you are running.
0.11.2 - 2018-04-17
- Added
update_userfunction and example
0.11.1 - 2018-04-10
- Fix
createUserto work withavatarURLandcustomData
0.11.0 - 2018-04-09
- All functions now take a single object as their only argument. Check the documentation for specifics on how to make calls using the new format.
Some examples:
authenticate used to be called like this:
chatkit.authenticate("my-user-id", { grant_type: "client_credentials" })and the new version is called like this:
chatkit.authenticate({
userId: "my-user-id",
authPayload: { grant_type: "client_credentials" },
})createUser used to be called like this:
chatkit.createRoom("ham", "New room")and the new version is called like this:
chatkit.createRoom({
creatorId: "ham",
name: "New room",
})authenticateno longer requires thegrant_typeto be specified. If no value for it is provided then it will take a default value ofclient_credentials(which was already the implicit default provided by clients)
0.10.0 - 2018-03-12
- Update jsonwebtoken dependency
- Added support for
getUserRooms - Added support for
getUserJoinableRooms - Added support for
createUsers
0.9.2 - 2018-02-08
getRoomMessagesnow has a signature ofgetRoomMessages(userId: string, roomId: number, options: GetRoomMessagesOptions = {})
getRoomMessagesnow generates a valid token when provided with an appropriateuserIdas the first parameter
0.9.1 - 2018-01-26
- Added
getRoomMessagesexample
getRoomsnow requires auserIdparameter, which is used to generate the token that the request is made with- Updated
getRoomsexample - Bumped pusher-platform-node dependency to 0.11.1
0.9.0 - 2018-01-16
- Added
updateGlobalRoomPermissionsexample
- When using
createUserthe promise that is returned now resolves with the JSON response from the API (which contains the user information), if the request succeeds
- Removed permissions constants and permissions checking from the SDK. The API will return a sensible error if you provide an invalid permission name
0.8.3 - 2018-01-04
- Support cursors permissions "cursors:read:get" and "cursors:read:set"
0.8.0 - 2017-12-19
- Don't parse response in apiRequest (since it isn't always JSON)
0.7.2 - 2017-12-11
- Add the
file:getandfile:createpermissions to the list of supported permissions
0.7.1 - 2017-11-23
- Correctly type the user id array in
getUsersByIdsasArray<string>instead ofArray<number>
0.7.0 - 2017-11-20
assignRoomRoleToUserandassignGlobalRoleToUsernow work regardless of whether or not a role has previously been assigned for a user
reassignRoomRoleForUserandreassignGlobalRoleForUserwere removed
0.6.0 - 2017-11-16
- Adds functionality to update permissions for existing roles by introducing two new functions:
updatePermissionsForRoomRoleandupdatePermissionsForGlobalRole.
0.5.2 - 2017-11-10
- Make
createRoomwork ifuserIdsisn't provided or is an empty array when creating a room.
- Make the response in the success case of room creation into an appropriate object from the body's JSON as opposed to an
IncomingMessageobject.
0.5.1 - 2017-11-10
createRoomnow takes aCreateRoomOptionsobject as its second parameter. This allows creating private rooms and adding users to a room at the point of creation. This looks like:
chatkit.createRoom(
'user_id_creating_room',
{
name: 'my room',
isPrivate: true,
userIds: ['some_other_user', 'and_another']
}
).then(() => {
...
}