Skip to content

Commit

Permalink
materialisation: Update to Ably 2.5.0
Browse files Browse the repository at this point in the history
- Updated package dependencies to Ably 2.5.0. Introduced additional message attributes including serial, action, and updated/deleted details.

- Introduced new RealtimeMessageNames which will allow filtering of chat message types.

- Fixed test so they work with the new fields.
  • Loading branch information
splindsay-92 committed Oct 25, 2024
1 parent 6fb3143 commit 12078ad
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
Binary file added ably-2.5.0.tgz
Binary file not shown.
Binary file added demo/ably-2.5.0.tgz
Binary file not shown.
39 changes: 39 additions & 0 deletions test/core/message-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,45 @@ describe('parseMessage', () => {
},
expectedError: 'received incoming deletion message without deletedAt',
},
{
description: 'message.action is unhandled',
roomId: 'room1',
message: {
data: { text: 'hello' },
clientId: 'client1',
timestamp: 1234567890,
extras: {},
serial: 'cbfkKvEYgBhDaZ38195418@1728402074206-0:0',
action: 'UNHANDLED_ACTION',
},
expectedError: 'received incoming message with unhandled action; UNHANDLED_ACTION',
},
{
description: 'message.editedAt is undefined for update',
roomId: 'room1',
message: {
data: { text: 'hello' },
clientId: 'client1',
timestamp: 1234567890,
extras: {},
serial: 'cbfkKvEYgBhDaZ38195418@1728402074206-0:0',
action: 'MESSAGE_UPDATE',
},
expectedError: 'received incoming update message without updatedAt',
},
{
description: 'message.deletedAt is undefined for deletion',
roomId: 'room1',
message: {
data: { text: 'hello' },
clientId: 'client1',
timestamp: 1234567890,
extras: {},
serial: 'cbfkKvEYgBhDaZ38195418@1728402074206-0:0',
action: 'MESSAGE_DELETE',
},
expectedError: 'received incoming deletion message without deletedAt',
},
])('should throw an error ', ({ description, roomId, message, expectedError }) => {
it(`should throw an error if ${description}`, () => {
expect(() => {
Expand Down

0 comments on commit 12078ad

Please sign in to comment.