Bruno Windels
a18bdad44f
dont replace a redacted event
2019-05-15 13:56:13 +01:00
Bruno Windels
600dff62e8
detect relations on encrypted events properly
2019-05-15 13:56:00 +01:00
Bruno Windels
db7a402e9b
mark original event as replaced instead of replacing the event object
...
this is more in line with what happens on the server-side,
and also doesn't break existing reply relations.
2019-05-15 12:05:39 +01:00
Bruno Windels
0e53f9052f
Merge pull request #913 from matrix-org/bwindels/message-edit-editor
...
Support for replacing message through m.replace relationship.
2019-05-15 09:22:34 +00:00
Bruno Windels
62e69cacb7
remove leftover code, fix lint
2019-05-14 15:52:02 +01:00
Bruno Windels
852c88c341
add unstableClientRelationReplacements in js-sdk
2019-05-14 15:33:49 +01:00
Bruno Windels
455f52f1f5
remove logging
2019-05-14 15:25:47 +01:00
Bruno Windels
df6012c58d
completely avoid local echo for edits for now
2019-05-14 15:25:07 +01:00
Bruno Windels
f68a3dde46
cleanup
2019-05-14 15:24:57 +01:00
Bruno Windels
25e6b1cac8
handle m.replace relations in room, emit Room.replaceEvent
2019-05-14 15:24:36 +01:00
Bruno Windels
18cd017f58
support marking an as replacing another
...
and take if the timestamp of the original event if so
also helper methods
2019-05-14 15:23:22 +01:00
Bruno Windels
0161664b6c
add support for replacing an existing event in a timeline(set)
2019-05-14 15:22:46 +01:00
Travis Ralston
25df31bf96
Use a short timeout for .well-known requests
...
Applies to verification of the homeserver, identity server, and fetching of the .well-known objects. Does not affect other HTTP requests.
See https://github.com/vector-im/riot-web/issues/9290
2019-05-13 18:39:59 -06:00
Travis Ralston
09438b440e
Fix spelling error in txnId for redactions
...
Fixes https://github.com/vector-im/riot-web/issues/9700
2019-05-13 13:43:44 -06:00
J. Ryan Stinnett
3a20114c39
Change to event-level beforeRedaction event for efficiency
...
To avoid an O(n^2) situation with every relations container trying to process
every redaction that may occur in a room, this switches to an event-level
notification, so that the specific relations container who cares can listen to
just the events it wants to know about.
2019-05-13 14:35:39 +01:00
J. Ryan Stinnett
f411d50253
Clarify before redaction event timing
2019-05-13 14:17:23 +01:00
J. Ryan Stinnett
00851df25c
Always add pending relation events to the timeline sets directly
...
This special cases pending relation events to go directly to the timeline sets
and ignores the `pendingEventOrdering` option. This feels a bit strange in the
code, so we should revisit this choice when we stabilized relation support.
2019-05-13 13:52:37 +01:00
J. Ryan Stinnett
8822d255b3
Fix indentation in src/models/event.js
2019-05-13 13:52:37 +01:00
J. Ryan Stinnett
4b4ba86167
Add Relations.add event for additional relations in collection
...
This adds a `Relations.add` event that consumers can listen for to be notified
each time an additional relation event is added to a relations collection.
Part of https://github.com/vector-im/riot-web/issues/9485
Part of https://github.com/vector-im/riot-web/issues/9572
2019-05-13 13:52:37 +01:00
J. Ryan Stinnett
7ea820f6e1
Add Event.relationsCreated event to listen for future relations collections
...
If you ask for relations but none currently exist, we return `null` to avoid the
overhead of many empty relations objects in memory. However, we still want some
way to alert consumers when one _is_ later made, so this event level event
provides that.
Part of https://github.com/vector-im/riot-web/issues/9572
Part of https://github.com/vector-im/riot-web/issues/9485
2019-05-13 13:52:37 +01:00
J. Ryan Stinnett
53d8cf0852
Update relation collections after redaction
...
This watches for redactions of relations and updates the relations collection
to match, including various aggregations. In addition, a redaction event is
emitted on the redaction collection to notify consumers of the change.
Part of https://github.com/vector-im/riot-web/issues/9574
Part of https://github.com/vector-im/riot-web/issues/9485
2019-05-13 13:52:37 +01:00
J. Ryan Stinnett
761806c678
Add support for class properties
...
This enables compiler and linting features to allow class properties like we do
in the React SDK.
2019-05-13 13:52:37 +01:00
J. Ryan Stinnett
6078bbbe24
Add basic read path for relations
...
This adds a read path for relations (gated behind an unstable option). A few
basic client-side grouping and sorting operations are supported. Consumers are
expected to ask the `EventTimelineSet` for a relation container when desired.
2019-05-08 18:05:52 +01:00
J. Ryan Stinnett
c1c81df4de
Intern rel_type for relations
...
In anticipation of relations being quite frequently used, we should intern
strings of common fields, such as `rel_type`.
2019-05-08 17:41:06 +01:00
Travis Ralston
b5c74b5666
Merge pull request #860 from matrix-org/travis/tombstone-notif
...
Add a concept of default push rules, using it for tombstone notifications
2019-05-03 11:21:37 -06:00
Travis Ralston
dc946dffbc
Add some words to explain why we do things the way we do
2019-05-03 11:19:46 -06:00
J. Ryan Stinnett
cdb78e4c75
Remove noisy debug logs
...
The debug logs in the sync loop haven't been helpful so far, and they are quite
noisy pushing other logs out of the way, so this change removes them.
2019-04-30 15:43:54 +01:00
Travis Ralston
16bfe79305
Merge pull request #897 from matrix-org/travis/wk-custom
...
Support being fed a .well-known config object for validation
2019-04-17 09:58:22 -06:00
J. Ryan Stinnett
d668f97c98
Clarify comment
...
Co-Authored-By: turt2live <travpc@gmail.com >
2019-04-17 09:44:52 -06:00
Bruno Windels
6b1d089caf
Merge branch 'develop' into bwindels/stylepreviewbar
2019-04-17 14:24:25 +02:00
Travis Ralston
af93401385
Use more appropriate errors for some situations
2019-04-16 11:13:36 -06:00
Travis Ralston
fa5add3d99
Use the right error codes
2019-04-16 11:03:58 -06:00
Travis Ralston
fb971580e0
Merge branch 'develop' into travis/wk-custom
2019-04-16 11:01:49 -06:00
Bruno Windels
dcaea98e33
emit self-membership event at end of handling sync update
...
otherwise the room state isn't updated yet (and we can't for
example distinguish a leave from a kick)
this is only used for updating the UI,
seems safe to emit this event at a later point
2019-04-16 17:16:24 +02:00
Travis Ralston
0f2f041d8b
Use constants for autodiscovery errors
...
To ease usage
2019-04-15 22:04:24 -06:00
Travis Ralston
7cede221de
Support being fed a .well-known config object for validation
...
Used by Riot to consume the user's provided config. This also includes a change to carry over custom keys on m.homeserver and m.identity_server which aren't intentionally controlled.
2019-04-15 21:22:49 -06:00
Travis Ralston
491226a916
Use the right this in _shouldAbortSync
2019-04-15 21:04:29 -06:00
Travis Ralston
14973a35c2
Use the right error object
2019-04-15 19:46:30 -06:00
Travis Ralston
b5779f8654
Merge pull request #895 from matrix-org/travis/stop-client-on-logout
...
Stop syncing when the token is invalid
2019-04-15 11:30:24 -06:00
Travis Ralston
f7d1984257
De-duplicate usage of shouldAbortSync
2019-04-15 11:29:55 -06:00
Bruno Windels
3fba683090
Merge pull request #887 from jkasun/fix_redact_put
...
change event redact, POST request to PUT request
2019-04-15 15:13:59 +00:00
jkasun
430da8ac09
JS Doc Fix
2019-04-15 20:34:39 +05:30
Travis Ralston
dcd9b5c382
Stop syncing when the token is invalid
...
Fixes https://github.com/vector-im/riot-web/issues/9451
2019-04-14 21:38:51 -06:00
jkasun
348c293962
Argument Length Check, Duplicate Fix for Redact Funcation
2019-04-13 22:23:57 +05:30
Travis Ralston
6db973f430
Expose better autodiscovery error messages
...
Fixes https://github.com/vector-im/riot-web/issues/7925
2019-04-11 15:50:43 -06:00
J. Ryan Stinnett
9f27bafa62
Merge pull request #892 from jryans/degraded-storage
...
Explicitly guard store usage during sync startup
2019-04-09 17:12:07 +01:00
Travis Ralston
b05136146a
Merge pull request #893 from matrix-org/travis/v3-safe
...
Flag v3 rooms as safe
2019-04-09 10:00:56 -06:00
Travis Ralston
13d3be637b
Copyright 2019 NV
2019-04-09 09:58:33 -06:00
J. Ryan Stinnett
44de7fad6f
Preserve previous error flow
2019-04-09 16:44:36 +01:00
J. Ryan Stinnett
b99243406b
Move logs inside try block
2019-04-09 16:40:13 +01:00