Skip to content

Commit 24b78e5

Browse files
committed
Add comments about timestamps
1 parent bc209e6 commit 24b78e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/models/room.ts

+9
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,9 @@ export class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandlerMap> {
792792
/**
793793
* Returns the last live event of this room.
794794
* "last" means latest timestamp.
795+
* Instead of using timestamps, it would be better to do the comparison based on the order of the homeserver DAG.
796+
* Unfortunately, this information is currently not available in the client.
797+
* See {@link https://github.com/matrix-org/matrix-js-sdk/issues/3325}.
795798
* "live of this room" means from all live timelines: the room and the threads.
796799
*
797800
* @returns MatrixEvent if there is a last event; else undefined.
@@ -809,6 +812,12 @@ export class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandlerMap> {
809812
}
810813

811814
/**
815+
* Returns the last thread of this room.
816+
* "last" means latest timestamp of the last thread event.
817+
* Instead of using timestamps, it would be better to do the comparison based on the order of the homeserver DAG.
818+
* Unfortunately, this information is currently not available in the client.
819+
* See {@link https://github.com/matrix-org/matrix-js-sdk/issues/3325}.
820+
*
812821
* @returns the thread with the most recent event in its live time line. undefined if there is no thread.
813822
*/
814823
public getLastThread(): Thread | undefined {

0 commit comments

Comments
 (0)