This backend update introduces significant changes to the gateway. There are no changes to the HTTP API.
The official web client has been updated to accomodate these changes.
- Gateway events have been reorganised
_SUCCESS
and_ERROR
events have been removed in favour ofGatewayMessage
s'success
property- Gateway error messages are no longer human readable; this should be handled client-side
- Gateway now closes the connection if a client does not respond to pings from the server in 30 seconds
enum GatewayEvent {
WELCOME,
AUTHENTICATE,
APP_LOGIN_AUTHENTICATE,
APP_LOGIN,
SYSTEM_ANNOUNCEMENT,
GROUPS_GET,
GROUP_NEW,
GROUP_UPDATE,
GROUP_REMOVE,
CHANNELS_GET,
CHANNEL_CREATE,
CHANNEL_UPDATE,
CHANNEL_REMOVE,
CHANNEL_DISCONNECT,
CHANNEL_HISTORY,
CHANNEL_JOIN,
MEMBER_CREATE,
MEMBER_UPDATE,
MEMBER_REMOVE,
GROUP_BAN_CREATE,
GROUP_BAN_UPDATE,
MESSAGE_SEND,
MESSAGE_CREATE,
MESSAGE_UPDATE,
MESSAGE_REMOVE,
ROLE_UPDATE,
ROLE_REMOVE,
MEMBER_LIST,
MEMBER_LIST_UPDATE,
PING = 9001
}
export class GatewayMessage<T> {
success: boolean;
event: GatewayEvent;
data: T;
}