You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: textile/chat-features.textile
+40-32Lines changed: 40 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -256,11 +256,15 @@ Broadly speaking, messages are published via REST calls to the Chat HTTP API and
256
256
** @(CHA-M2e)@ @[Testable]@ In global ordering, a @Message@ is considered to occur before another @Message@ if the @serial@ of the first @Message@ is before the latter when lexicographically sorted.
257
257
** @(CHA-M2f)@ @[Testable]@ In global ordering, a @Message@ is considered after another @Message@ if the @serial@ of the first @Message@ is after the latter when lexicographically sorted.
258
258
** @(CHA-M2g)@ @[Testable]@ Two @Messages@ are considered to be the same if they have the same @serial@, that is to say, both @Serial@ strings are identical.
259
-
* @(CHA-M10)@ A @Message@ can be modified by applying a new @action@ to it, such as an update or delete. Applying an @action@ generates a new @Message@ instance with an updated @latestActionSerial@, while the original Message’s @serial@ remains unchanged.
260
-
** @(CHA-M10a)@ @[Testable]@ The @latestActionSerial@ of a @Message@ is a lexicographically sortable, unique identifier for each action applied to the @Message@. Unlike @serial@, @latestActionSerial@ is mutable and is updated each time an @action@ is applied.
261
-
** @(CHA-M10b)@ @[Testable]@ In global ordering, an @action@ is considered to occur before another @action@ if the @latestActionSerial@ of the first @action@ is before the latter when lexicographically sorted.
262
-
** @(CHA-M10c)@ @[Testable]@ In global ordering, an @action@ is considered to occur after another @action@ if the @latestActionSerial@ of the first @action@ is after the latter when lexicographically sorted.
263
-
** @(CHA-M10d)@ @[Testable]@ Two @actions@ are considered to be the same if they have the same @latestActionSerial@, that is to say, both @latestActionSerial@ strings are identical.
259
+
* @(CHA-M10)@ A @Message@ can be modified by applying a new @action@ to it, such as an update or delete. Applying an @action@ must generate a new @Message@ instance with the same @serial@ and an updated @version@.
260
+
** @(CHA-M10a)@ @[Testable]@ The @version@ of a @Message@ is a lexicographically sortable, unique identifier for each version of the @Message@.
261
+
** @(CHA-M10b)@ This clause has been deleted.
262
+
** @(CHA-M10c)@ This clause has been deleted.
263
+
** @(CHA-M10d)@ This clause has been deleted.
264
+
** @(CHA-M10e)@ @[Testable]@ To sort @Message@ @versions@ of the same @Message@ (instances with the same @serial@) in global order, sort @Message@ instances lexicographically by their @version@ property.
265
+
*** @(CHA-M10e1)@ @[Testable]@ Two @Message@ instances of the same @serial@ are considered the same version if they have the same @version@ property.
266
+
*** @(CHA-M10e2)@ @[Testable]@ Among @Message@ instances of the same @serial@, the one with a lexicographically higher @version@ is newer.
267
+
*** @(CHA-M10e3)@ @[Testable]@ Among @Message@ instances of the same @serial@, the one with a lexicographically lower @version@ is older.
264
268
* @(CHA-M3)@ A client must be able to send a message to a room.
265
269
** @(CHA-M3f)@ @[Testable]@ A client may send a message via the Chat REST API.
266
270
** @(CHA-M3a)@ @[Testable]@ When a message is sent successfully via the Chat REST API, the caller shall receive a struct representing the "@Message@":#chat-structs-message in response, as if it were received via Realtime event.
There are getters provided in the @Message@ object to provide easy access to updated/deleted information:
861
+
* @isUpdated@ returns @true@ if the message is updated
862
+
* @isDeleted@ returns @true@ if the message is deleted
863
+
* @updatedBy@ returns the clientId from @operation.clientId@ if the message is updated, @undefined@ otherwise
864
+
* @deletedBy@ returns the clientId from @operation.clientId@ if the message is deleted, @undefined@ otherwise
865
+
* @updatedAt@ returns the @timestamp@ from the operation if the message is updated, @undefined@ otherwise
866
+
* @deletedAt@ returns the @timestamp@ from the operation if the message is deleted, @undefined@ otherwise
867
+
860
868
Determining the global order of messages may be achieved by lexicographically comparing the serials. See @CHA-M2@ for more information.
861
869
862
-
Determining the global order of message actions may be achieved by lexicographically comparing the @latestActionSerial@. See @CHA-M10@ for more information.
870
+
Determining the global order of message versions may be achieved by lexicographically comparing the @version@. See @CHA-M10@ for more information.
0 commit comments