You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Rewrite receipt-handling code (#3901)
* Rewrite receipt-handling code * Add tests around dangling receipts * Fix mark as read for some rooms * Add missing word --------- Co-authored-by: Florian Duros <florian.duros@ormaz.fr> Co-authored-by: Florian Duros <florianduros@element.io>
This commit is contained in:
@@ -5168,7 +5168,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
||||
|
||||
const room = this.getRoom(event.getRoomId());
|
||||
if (room && this.credentials.userId) {
|
||||
room.addLocalEchoReceipt(this.credentials.userId, event, receiptType);
|
||||
room.addLocalEchoReceipt(this.credentials.userId, event, receiptType, unthreaded);
|
||||
}
|
||||
return promise;
|
||||
}
|
||||
@@ -9916,7 +9916,7 @@ export function threadIdForReceipt(event: MatrixEvent): string {
|
||||
* @returns true if this event is considered to be in the main timeline as far
|
||||
* as receipts are concerned.
|
||||
*/
|
||||
function inMainTimelineForReceipt(event: MatrixEvent): boolean {
|
||||
export function inMainTimelineForReceipt(event: MatrixEvent): boolean {
|
||||
if (!event.threadRootId) {
|
||||
// Not in a thread: then it is in the main timeline
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user