10 KiB
Changes in XXX
BREAKING CHANGES:
RoomMember.getAvatarUrl()andMatrixClient.mxcUrlToHttp()now return the empty string when given anything other than an mxc:// URL. This ensures that clients never inadvertantly reference content directly, leaking information to third party servers. TheallowDirectLinksoption is provided if the client wants to allow such links.
Changes in 0.3.0
-
MatrixClient.getAvatarUrlForMemberhas been removed and replaced withRoomMember.getAvatarUrl. Arguments remain the same except the homeserver URL must now be supplied fromMatrixClient.getHomeserverUrl().// before var url = client.getAvatarUrlForMember(member, width, height, resize, allowDefault) // after var url = member.getAvatarUrl(client.getHomeserverUrl(), width, height, resize, allowDefault) -
MatrixClient.getAvatarUrlForRoomhas been removed and replaced withRoom.getAvatarUrl. Arguments remain the same except the homeserver URL must now be supplied fromMatrixClient.getHomeserverUrl().// before var url = client.getAvatarUrlForRoom(room, width, height, resize, allowDefault) // after var url = room.getAvatarUrl(client.getHomeserverUrl(), width, height, resize, allowDefault) -
s/Room.getMembersWithMemership/Room.getMembersWithMembership/g
New methods:
- Added support for sending receipts via
MatrixClient.sendReceipt(event, receiptType, callback)andMatrixClient.sendReadReceipt(event, callback). - Added support for receiving receipts via
Room.getReceiptsForEvent(event)andRoom.getUsersReadUpTo(event). Receipts can be directly added to aRoomusingRoom.addReceipt(event)though theMatrixClientdoes this for you. - Added support for muting local video and audio via the new methods
MatrixCall.setMicrophoneMuted(),MatrixCall.isMicrophoneMuted(muted),MatrixCall.isLocalVideoMuted()andMatrix.setLocalVideoMuted(muted). - Added experimental support for screen-sharing in Chrome via
MatrixCall.placeScreenSharingCall(remoteVideoElement, localVideoElement). - Added ability to perform server-side searches using
MatrixClient.searchMessageText(opts)andMatrixClient.search(opts).
Improvements:
- Improve the performance of initial sync processing from
O(n^2)toO(n). Room.namewill now take into accountm.room.canonical_aliasevents.MatrixClient.startClientnow takes an Objectoptsrather than a Number in a backwards-compatible way. Thisoptsallows syncing configuration options to be specified includingincludeArchivedRoomsandresolveInvitesToProfiles.Roomobjects which represent room invitations will now have state populated frominvite_room_stateif it is included in them.room.memberevent.Room.getAvatarUrlwill now take into accountm.room.avatarevents.
Changes in 0.2.2
Bug fixes:
- Null pointer fixes for VoIP calling and push notification processing.
- Set the
Content-Typetoapplication/octet-streamin the event that the file object has notype.
New methods:
- Added
MatrixClient.getCasServer()which calls through to the HTTP endpoint/login/cas. - Added
MatrixClient.loginWithCas(ticket, service)which logs in with the typem.login.cas. - Added
MatrixClient.getHomeserverUrl()which returns the URL passed in the constructor. - Added
MatrixClient.getIdentityServerUrl()which returns the URL passed in the constructor. - Added
getLastModifiedTime()toRoomMember,RoomStateandUserobjects. This makes it easier to see if the object in question has changed, which can be used to improve performance by only rendering when these objects change.
Changes in 0.2.1
BREAKING CHANGES
MatrixClient.joinRoomhas changed from(roomIdOrAlias, callback)to(roomIdOrAlias, opts, callback).
Bug fixes:
- The
Content-Typeof file uploads is now explicitly set, without relying on the browser to do it for us.
Improvements:
- The
MatrixScheduler.RETRY_BACKOFF_RATELIMITfunction will not retry when the response is a 400,401,403. - The text returned from a room invite now includes who the invite was from.
- There is now a try/catch block around the
requestfunction which will reject/errback appropriately if an exception is thrown synchronously in it.
New methods:
MatrixClient.createAlias(alias, roomId)MatrixClient.getRoomIdForAlias(alias)MatrixClient.sendNotice(roomId, body, txnId, callback)MatrixClient.sendHtmlNotice(roomId, body, htmlBody, callback)
Modified methods:
MatrixClient.joinRoom(roomIdOrAlias, opts)whereoptscan include asyncRoom: true|falseflag to control whether a room initial sync is performed after joining the room.MatrixClient.getAvatarUrlForMemberhas a new last argallowDefaultwhich returns the default identicon URL iftrue.MatrixClient.getAvatarUrlForRoomhas a new last argallowDefaultwhich is passed through to the default identicon generation forgetAvatarUrlForMember.
Changes in 0.2.0
BREAKING CHANGES:
MatrixClient.setPowerLevelnow expects aMatrixEventand not anObjectfor theeventparameter.
New features:
- Added
EventStatus.QUEUEDwhich is set on an event when it is waiting to be sent by the scheduler and there are other events in front. - Added support for processing push rules on an event. This can be obtained by
calling
MatrixClient.getPushActionsForEvent(event). - Added WebRTC support. Outbound calls can be made via
call = global.createNewMatrixCall(MatrixClient, roomId)followed bycall.placeVoiceCall()orcall.placeVideoCall(remoteEle, localEle). Inbound calls will be received via the event"Call.incoming"which provides a call object which can be followed withcall.answer()orcall.hangup(). - Added the ability to upload files to the media repository.
- Added the ability to change the client's password.
- Added the ability to register with an email via an identity server.
- Handle presence events by updating the associated
Userobject. - Handle redaction events.
- Added infrastructure for supporting End-to-End encryption. E2E is NOT available in this version.
New methods:
MatrixClient.getUser(userId)MatrixClient.getPushActionsForEvent(event)MatrixClient.setPassword(auth, newPassword)MatrixClient.loginWithSAML2(relayState, callback)MatrixClient.getAvatarUrlForMember(member, w, h, method)MatrixClient.mxcUrlToHttp(url, w, h, method)MatrixClient.getAvatarUrlForRoom(room, w, h, method)MatrixClient.uploadContent(file, callback)Room.getMembersWithMembership(membership)MatrixScheduler.getQueueForEvent(event)MatrixScheduler.removeEventFromQueue(event)$DATA_STORE.setSyncToken(token)$DATA_STORE.getSyncToken()
Crypto infrastructure (crypto is NOT available in this version):
global.CRYPTO_ENABLEDMatrixClient.isCryptoEnabled()MatrixClient.uploadKeys(maxKeys)MatrixClient.downloadKeys(userIds, forceDownload)MatrixClient.listDeviceKeys(userId)MatrixClient.setRoomEncryption(roomId, config)MatrixClient.isRoomEncrypted(roomId)
New classes:
MatrixCallWebStorageStore- WIP; unstableWebStorageSessionStore- WIP; unstable
Bug fixes:
- Member name bugfix: Fixed an issue which prevented
RoomMember.namebeing disambiguated if there was exactly 1 other person with the same display name. - Member name bugfix: Disambiguate both clashing display names with user IDs in the event of a clash.
- Room state bugfix: Fixed a bug which incorrectly overwrote power levels locally for a room.
- Room name bugfix: Ignore users who have left the room when determining a room name.
- Events bugfix: Fixed a bug which prevented the
senderandtargetproperties from being set.
Changes in 0.1.1
BREAKING CHANGES:
Room.calculateRoomNameis now private. UseRoom.recalculateinstead, and access the calculated name viaRoom.name.new MatrixClient(...)no longer creates aMatrixInMemoryStoreifopts.storeis not specified. Instead, thecreateClientglobal function creates it and passes it to the constructor. This change will not affect users who have always usedcreateClientto create aMatrixClient."Room"events will now be emitted when the Room has finished being populated with state rather than at the moment of creation. This will fire when the SDK encounters a room it doesn't know about (just arrived from the event stream; e.g. a room invite) and will also fire after syncing room state (e.g. after calling joinRoom).MatrixClient.joinRoomnow returns aRoomobject when resolved, not an object with aroom_idproperty.MatrixClient.scrollbacknow expects aRoomarg instead of aroom_idandfromtoken. Construct anew Room(roomId)if you want to continue using this directly, then set the pagination token usingroom.oldState.paginationToken = from. It now resolves to aRoomobject instead of the raw HTTP response.
New properties:
User.eventsRoomMember.events
New methods:
Room.hasMembershipState(userId, membership)MatrixClient.resendEvent(event, room)
New features:
- Local echo. When you send an event using the SDK it will immediately be
added to
Room.timelinewith theevent.statusofEventStatus.SENDING. When the event is finally sent, this status will be removed. - Not sent status. When an event fails to send using the SDK, it will have the
event.statusofEventStatus.NOT_SENT. - Retries. If events fail to send, they will be automatically retried.
- Manual resending. Events which failed to send can be passed to
MatrixClient.resendEvent(event, room)to resend them. - Queueing. Messages sent in quick succession will be queued to preserve the order in which they were submitted.
- Room state is automatcally synchronised when joining a room (including if another device joins a room).
- Scrollback. You can request earlier events in a room using
MatrixClient.scrollback(room, limit, callback).
Bug fixes:
- Fixed a bug which prevented the event stream from polling. Some devices will black hole requests when they hibernate, meaning that the callbacks will never fire. We now maintain a local timer to forcibly restart the request.