Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Latest commit

 

History

History
286 lines (184 loc) · 8.84 KB

File metadata and controls

286 lines (184 loc) · 8.84 KB

Changelog

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.

Added

  • Adds message editing via edit{Simple,Multipart,}Message.

1.8.0 Yanked

Added

  • Support for fetching a message by its message ID, via fetchMultipartMessage

1.6.2 - 2019-11-19

Fixed

  • generateToken now correctly sets the JWT token expiry on all cases

1.6.1 - 2019-09-06

Fixed

  • getOptionalFields now works as expected and returns optionally set values.

1.6.0 - 2019-07-30

Added

  • Support for push_notification_title_override to createRoom and updateRoom

1.5.0 - 2019-07-04

Added

  • createRoom now accepts an optional id parameter that is then uniquely used to identify the room. If one isn't provided, the server will generate an ID instead.

Changed

  • The deleteMessage method now requires a room ID parameter, room_id and the id parameter has been renamed to message_id to avoid any ambiguity.

1.4.0 - 2019-06-24

Changed

  • Unread counts. No new methods are added, but getUserRooms now include unread_count and last_message_at in the response

1.3.0 - 2019-06-18

Added

  • Async deletion methods. asyncDeleteUser, asyncDeleteRoom and getDeleteStatus. The deleteRoom and deleteUser methods should be considered deprecated, and will be removed in a future version.

1.2.0 - 2019-03-08

Added

  • sendMultipartMessage and sendSimpleMessage using the new V3 endpoint for message sending
  • fetchMultipartMessage using the new V3 endpoint for message fetching

Changed

  • all methods except sendMessage and getRoomMessages uses new V3 endpoints

1.1.0 - 2018-11-08

Added

  • custom_data option that can be passed to createRoom and updateRoom

1.0.0 - 2018-10-30

Changed

Breaking Changes

  • getUsersByIds is now getUsersById
  • getUsers now takes an array with an optional from_timestamp key instead of a from_ts key
  • getUserReadCursors is now getReadCursorsForUser

Added

  • The following new methods:
    • generateSuToken
    • createUsers
    • getUser
    • updateRoom
    • deleteRoom
    • getRoom
    • getRooms
    • getUserJoinableRooms
    • addUsersToRoom
    • removeUsersFromRoom
    • createGlobalRole
    • createRoomRole
    • deleteGlobalRole
    • deleteRoomRole
    • assignGlobalRoleToUser
    • assignRoomRoleToUser
    • getRoles
    • getUserRoles
    • removeGlobalRoleForUser
    • removeRoomRoleForUser
    • getPermissionsForGlobalRole
    • getPermissionsForRoomRole
    • updatePermissionsForGlobalRole
    • updatePermissionsForRoomRole
    • getReadCursor
    • getReadCursorsForRoom
    • apiRequest
    • authorizerRequest
    • cursorsRequest

0.5.9 - 2018-08-29

Added

0.5.8 - 2018-08-21

Added

  • addUsersToRoom and removeUsersFromRoom functionality added. #29 by @mludi

0.5.7 - 2018-08-14

Added

  • joinRoom functionality added. #27 by @mludi

0.5.6 - 2018-07-30

Fixed

  • getUsersByIds and getUsers now properly set query parameters

0.5.5 - 2018-07-30

Added

0.5.4 - 2018-06-25

Added

0.5.3 - 2018-06-11

Added

0.5.2 - 2018-06-07

Fixed

Added

0.5.1 - 2018-05-25

Changed

  • User ID is validated to be a string as part of createUser, authenticate, and generateAccessToken calls

Fixed

  • getUserRooms no longer crashes if joinable option not set

0.5.0 - 2018-05-11

Changed

  • API calls to Chatkit servers now return an associative array that has the keys 'status' and 'body'.

0.4.0 - 2018-04-20

Added

  • authenticate has been added. This should be the function you use to authenticate your users for Chatkit.

You need to provide an associative array that has a user_id key with a string value. For example:

$chatkit->authenticate([ 'user_id' => 'ham' ]);

It returns an associative array that is structured 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.

Removed

  • getTokenPair has been removed

Changed

  • 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.
  • (Nearly) all functions now take an object (an associative array) as their sole parameter. As examples:
  • Constructing a Chatkit object is done like this:
$chatkit = new Chatkit\Chatkit([
    'instance_locator' => 'your:instance:locator',
    'key' => 'your:key'
]);
  • createUser is now called like this:
$chatkit->createUser([
    'id' => 'dr_php',
    'name' => 'Dr PHP',
    'avatar_url' => 'https://placekitten.com/400/500',
    'custom_data' => [
        'a' => 'piece of data'
    ]
]);
  • authenticate (previously getTokenPair) is now called like this:
$chatkit->authenticate([
    'user_id' => 'dr_php'
]);
  • createRoom is now called like this:
$chatkit->createRoom([
    'creator_id' => 'dr_php',
    'name' => 'A room with a name',
    'private' => false
]);