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
updateRoom
privacy not updating whenisPrivate
value isfalse
- Support for
PushNotificationTitleOverride
attribute 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
id
parameter to thecreateRoom
method.
- The
deleteMessage
method now requires a room ID parameter,roomID
, and theid
parameter has been renamed tomessageId
to avoid ambiguity.
1.3.0 - 2019-06-24
- Unread counts. No new methods are added, but
getUserRooms
now includeunread_count
andlast_message_at
in the response
- Async deletion methods.
asyncDeleteUser
,getDeleteUserStatus
,asyncDeleteRoom
,getDeleteRoomStatus
. ThedeleteRoom
anddeleteUser
methods should be considered deprecated, and will be removed in a future version.
- Multipart message support:
sendSimpleMessage
,sendMultipartMessage
,fetchMultipartMessages
all deal in the multipart message format.
- Keep HTTP connections alive.
- Upgrade dependencies to avoid vulnerabilities
CreateRoom
andUpdateRoom
both now support thecustomData
option.
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
getUsersByIds
is nowgetUsersById
GetUsersByIdsOptions
is nowGetUsersByIdOptions
- Every mention of
roleName
is now justname
getRoom
,getRooms
andgetRoomMessages
no longer require auserId
getRooms
now takesincludePrivate
andfromID
parameters for looking up private rooms and paginating by ID
- The following new methods:
getUser
sendMessage
deleteMessage
updateRoom
deleteRoom
addUsersToRoom
removeUsersFromRoom
setReadCursor
getReadCursor
getReadCursorsForUser
getReadCursorsForRoom
cursorsRequest
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
authenticate
now 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:
status
is the suggested HTTP response status code,headers
are the suggested response headers,body
holds 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.0
of 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_user
function and example
0.11.1 - 2018-04-10
- Fix
createUser
to work withavatarURL
andcustomData
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",
})
authenticate
no longer requires thegrant_type
to 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
getRoomMessages
now has a signature ofgetRoomMessages(userId: string, roomId: number, options: GetRoomMessagesOptions = {})
getRoomMessages
now generates a valid token when provided with an appropriateuserId
as the first parameter
0.9.1 - 2018-01-26
- Added
getRoomMessages
example
getRooms
now requires auserId
parameter, which is used to generate the token that the request is made with- Updated
getRooms
example - Bumped pusher-platform-node dependency to 0.11.1
0.9.0 - 2018-01-16
- Added
updateGlobalRoomPermissions
example
- When using
createUser
the 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:get
andfile:create
permissions to the list of supported permissions
0.7.1 - 2017-11-23
- Correctly type the user id array in
getUsersByIds
asArray<string>
instead ofArray<number>
0.7.0 - 2017-11-20
assignRoomRoleToUser
andassignGlobalRoleToUser
now work regardless of whether or not a role has previously been assigned for a user
reassignRoomRoleForUser
andreassignGlobalRoleForUser
were removed
0.6.0 - 2017-11-16
- Adds functionality to update permissions for existing roles by introducing two new functions:
updatePermissionsForRoomRole
andupdatePermissionsForGlobalRole
.
0.5.2 - 2017-11-10
- Make
createRoom
work ifuserIds
isn'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
IncomingMessage
object.
0.5.1 - 2017-11-10
createRoom
now takes aCreateRoomOptions
object 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(() => {
...
}