fix: Get direct chat from user ID method

The method was not type safe and therefore there
was no warning that with the sortOrder changes
now DateTimes are compared which leads to
an exception in the app if not using converting to milliseconds first.
This commit is contained in:
Krille Fear 2021-09-13 13:25:16 +02:00
parent 48197e2258
commit 56af96c7ea
1 changed files with 2 additions and 2 deletions

View File

@ -306,8 +306,8 @@ class Client extends MatrixApi {
null,
(prev, r) => prev == null
? r
: (prev.lastEvent.originServerTs <
r.lastEvent.originServerTs
: (prev.lastEvent.originServerTs.millisecondsSinceEpoch <
r.lastEvent.originServerTs.millisecondsSinceEpoch
? r
: prev))
.id;