Commit graph

18535 commits

Author SHA1 Message Date
Damir Jelić
1b63886a6b MatrixChat: Add more detailed logging to the event crawler. 2019-10-18 16:31:39 +02:00
Damir Jelić
3f53691834 RoomView: Use platform specific search if our platform supports it.
This patch extends our search to include our platform specific event
index.

There are 3 search scenarios and are handled differently when platform
support for indexing is present:

    - Search a single non-encrypted room: Use the server-side search
        like before.
    - Search a single encrypted room: Search using our platform specific
        event index.
    - Search across all rooms: Search encrypted rooms using our local
        event index. Search non-encrypted rooms using the classic
        server-side search. Combine the results.

The combined search will result in having twice the amount of search
results since comparing the scores fairly wasn't deemed sensible.
2019-10-11 16:55:01 +02:00
Damir Jelić
4acec19d40 MatrixChat: Add new crawler checkpoints if there was a limited timeline.
A sync call may not have all events that happened since the last time
the client synced. In such a case the room is marked as limited and
events need to be fetched separately.

When such a sync call happens our event index will have a gap. To
close the gap checkpoints are added to start crawling our room again.
Unnecessary full re-crawls are prevented by checking if our current
/room/roomId/messages request contains only events that were already
present in our event index.
2019-10-11 16:55:01 +02:00
Damir Jelić
5e7076e985 MatrixChat: Add live events to the event index as well. 2019-10-11 16:55:01 +02:00
Damir Jelić
b23ba5f881 MatrixChat: Stop the crawler function and delete the index when logging out. 2019-10-11 16:55:01 +02:00
Damir Jelić
9ce478cb0e MatrixChat: Create an event index and start crawling for events.
This patch adds support to create an event index if the clients platform
supports it and starts an event crawler.

The event crawler goes through the room history of encrypted rooms and
eventually indexes the whole room history of such rooms.

It does this by first creating crawling checkpoints and storing them
inside a database. A checkpoint consists of a room_id, direction and
token.

After the checkpoints are added the client starts a crawler method in
the background. The crawler goes through checkpoints in a round-robin
way and uses them to fetch historic room messages using the
rooms/roomId/messages API endpoint.

Every time messages are fetched a new checkpoint is created that will
be stored in the database with the fetched events in an atomic way, the
old checkpoint is deleted at the same time as well.
2019-10-11 16:55:01 +02:00
Damir Jelić
b8a3ee1841 BasePlatform: Add prototype methods for event indexing. 2019-10-11 16:55:01 +02:00
Michael Telatynski
6e33cc0650
Merge pull request #3433 from matrix-org/t3chguy/nvl/react16/EventListSummary
Summarise state events after room creation
2019-10-11 09:53:26 +01:00
Michael Telatynski
dcc948f43d
Merge pull request #3543 from matrix-org/t3chguy/timeline_keyboard_focus
Don't intercept TAB on the app outside of the composer, fix tabIndex > 0
2019-10-10 17:52:10 +01:00
David Baker
c2a5253479
Merge pull request #3546 from matrix-org/dbkr/malformed_events
Add some type checking on event body
2019-10-10 17:46:26 +01:00
David Baker
847acff894 Add some type checking on event body 2019-10-10 17:36:22 +01:00
Bruno Windels
4fa165ceea
Merge pull request #3544 from matrix-org/bwindels/fix-edit-unmount-when-no-selection
Fix: crash while canceling editing an event when no selection
2019-10-10 14:57:18 +00:00
Bruno Windels
f8a610687f don't persist caret when selection is missing
so caret will be put back at end of editor when remounting
2019-10-10 16:40:03 +02:00
Bruno Windels
905aa81bf8 safeguard if the offsetnode is null when determining caret position 2019-10-10 16:39:41 +02:00
Michael Telatynski
5643743167 Don't intercept TAB on the app outside of the composer, fix tabIndex > 0
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-10 14:13:29 +01:00
Michael Telatynski
7160922b77
Merge pull request #3541 from matrix-org/t3chguy/fix_150rc1
SettingsFlag always run ToggleSwitch fully-controlled
2019-10-10 09:39:33 +01:00
Michael Telatynski
61654a338c
Merge pull request #3540 from matrix-org/t3chguy/use_Keyboard.Key
Use Keyboard Key consts instead of hardcoded strings
2019-10-10 09:13:05 +01:00
Michael Telatynski
0d42b8629e remove SettingsFlag manualSave altogether
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 23:20:59 +01:00
Michael Telatynski
685c2f494a actually always run fully controlled
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 22:33:14 +01:00
Michael Telatynski
2b9c102f07 SettingsFlag always run ToggleSwitch fully-controlled
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 22:27:49 +01:00
Michael Telatynski
58317b1608 Use Keyboard Key variables instead of hardcoded strings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 19:59:11 +01:00
David Baker
84e71297ef
Merge pull request #3539 from RiotTranslateBot/weblate-riot-web-matrix-react-sdk
Update from Weblate
2019-10-09 16:37:05 +01:00
Weblate
5fba897754 Merge branch 'origin/develop' into Weblate. 2019-10-09 15:26:28 +00:00
Szimszon
3771b9fd60 Translated using Weblate (Hungarian)
Currently translated at 100.0% (1830 of 1830 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/hu/
2019-10-09 15:26:28 +00:00
Tentarial
fddf13aa49 Translated using Weblate (German)
Currently translated at 84.0% (1537 of 1830 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/de/
2019-10-09 15:26:28 +00:00
jadiof
ef6f722d2c Translated using Weblate (German)
Currently translated at 84.0% (1537 of 1830 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/de/
2019-10-09 15:26:27 +00:00
Michael Telatynski
ff18a04da1
Merge pull request #3529 from matrix-org/t3chguy/react16_cleanup2
React error/warning cleanup
2019-10-09 16:26:24 +01:00
Weblate
ab21265b81 Merge branch 'origin/develop' into Weblate. 2019-10-09 11:38:46 +00:00
J. Ryan Stinnett
93ff43f7e1
Merge pull request #3535 from matrix-org/jryans/tag-react-soft-crashes
Add label to rageshakes for React soft crashes
2019-10-09 12:38:42 +01:00
Michael Telatynski
aae5bb9f39 Use new React Shallow renderer with hooks support
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 13:08:16 +02:00
Weblate
eefcbecd78 Merge branch 'origin/develop' into Weblate. 2019-10-09 11:02:11 +00:00
송태섭
642e58b2c1 Translated using Weblate (Korean)
Currently translated at 100.0% (1828 of 1828 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/ko/
2019-10-09 11:02:11 +00:00
Kévin C
8ce810830a Translated using Weblate (French)
Currently translated at 100.0% (1828 of 1828 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/fr/
2019-10-09 11:02:11 +00:00
Jeff Huang
17dc3aa093 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1828 of 1828 strings)

Translation: Riot Web/matrix-react-sdk
Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/zh_Hant/
2019-10-09 11:02:10 +00:00
David Baker
aa6ce97b2f
Merge pull request #3534 from matrix-org/dbkr/add_threepid_ui_auth
Support UI Auth on adding email addresses & phone numbers
2019-10-09 12:02:05 +01:00
J. Ryan Stinnett
e905abe5ce Add label to rageshakes for React soft crashes
This adds a label all rageshakes submitted via the React error boundary marking
them as soft crashes for triage.

Fixes https://github.com/vector-im/riot-web/issues/11072
2019-10-09 11:59:10 +01:00
Michael Telatynski
f2d73793ee delint again
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
9331ca9d07 delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
6be318b59d Only insert ELS if it'll be non-empty
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
5c960dccb7 delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
efeb6e87c4 Use new React Shallow renderer with hooks support
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
37b8b52d0d regenerate components
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:50:19 +02:00
Michael Telatynski
efde7f289f Use EventListSummary on m.room.create events and state events thereafter
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:50:03 +02:00
Michael Telatynski
34530843f4 Factor out generic EventListSummary from MELS
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:50:03 +02:00
David Baker
93aebf9e68 Return promises a better way 2019-10-09 11:30:44 +01:00
David Baker
1c207f3b55 Revert 2040587826 2019-10-09 11:28:16 +01:00
David Baker
2040587826 Return promises 2019-10-09 10:47:34 +01:00
David Baker
a653fea020 Removed unused lines
Moved these around to avpid NPEs but they went away and I didn't
notice when merging.
2019-10-09 10:33:29 +01:00
Weblate
66a9308e27 Merge branch 'origin/develop' into Weblate. 2019-10-08 22:23:44 +00:00
J. Ryan Stinnett
4635b1319a
Merge pull request #3533 from matrix-org/jryans/null-client-soft-crash
Unmount React components before stopping the client
2019-10-08 23:23:40 +01:00