Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into export-conversations

This commit is contained in:
Jaiwanth 2021-06-05 11:27:08 +05:30
commit 8786c97cdb
118 changed files with 4704 additions and 1573 deletions

View file

@ -62,7 +62,7 @@ export default abstract class Exporter {
const stateRes: any[] = [];
while (limit) {
const eventsPerCrawl = Math.min(limit, 100);
const res = await client._createMessagesRequest(this.room.roomId, prevToken, eventsPerCrawl, "b");
const res: any = await client.createMessagesRequest(this.room.roomId, prevToken, eventsPerCrawl, "b");
if (res.state) stateRes.push(...res.state);
if (res.chunk.length === 0) break;

View file

@ -73,3 +73,14 @@ export function copyNode(ref: Element): boolean {
selectText(ref);
return document.execCommand('copy');
}
const collator = new Intl.Collator();
/**
* Performant language-sensitive string comparison
* @param a the first string to compare
* @param b the second string to compare
*/
export function compare(a: string, b: string): number {
return collator.compare(a, b);
}