Skip to content

Commit

Permalink
Merge pull request #1916 from ably/materialisation/support-update-serial
Browse files Browse the repository at this point in the history
Update `Message` to support `updateSerial`
  • Loading branch information
AndyTWF authored Nov 6, 2024
2 parents 137a8a7 + 21e42ea commit 6544622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ably.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2356,9 +2356,9 @@ export interface Message {
*/
updatedAt?: number;
/**
* If a `deletion` operation was applied to this message, this will be the timestamp the deletion occurred.
* The serial of the operation that updated this message.
*/
deletedAt?: number;
updateSerial?: string;
/**
* If this message resulted from an operation, this will contain the operation details.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/common/lib/types/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class Message {
refSerial?: string;
refType?: string;
updatedAt?: number;
deletedAt?: number;
updateSerial?: string;
operation?: API.Operation;

/**
Expand Down Expand Up @@ -378,7 +378,7 @@ class Message {
refSerial: this.refSerial,
refType: this.refType,
updatedAt: this.updatedAt,
deletedAt: this.deletedAt,
updateSerial: this.updateSerial,
operation: this.operation,
encoding,
data,
Expand Down Expand Up @@ -407,7 +407,7 @@ class Message {
if (this.refSerial) result += '; refSerial=' + this.refSerial;
if (this.refType) result += '; refType=' + this.refType;
if (this.updatedAt) result += '; updatedAt=' + this.updatedAt;
if (this.deletedAt) result += '; deletedAt=' + this.deletedAt;
if (this.updateSerial) result += '; updateSerial=' + this.updateSerial;
if (this.operation) result += '; operation=' + JSON.stringify(this.operation);
result += ']';
return result;
Expand Down

0 comments on commit 6544622

Please sign in to comment.