Michael Telatynski
60d665e866
Fix degraded mode for the IDBStore and test it ( #2400 )
...
* Add tests around IDB degraded mode
* Fix wrong `this` reference in idb degraded mode store
2022-05-25 07:02:14 +01:00
Michael Telatynski
e81d84502b
Fix behaviour of isRelation with relation m.replace for state events ( #2389 )
...
* Add some short-circuits to skip async code
* Fix behaviour of `isRelation` with relation `m.replace` for state events
2022-05-20 12:32:59 +01:00
Travis Ralston
c6af997542
Add a catastrophic throw to thread constructor ( #2375 )
...
This is an attempt to narrow down https://github.com/vector-im/element-web/issues/22141
2022-05-17 00:20:41 -06:00
Johannes Marbach
f44510e65f
Add support for HTML renderings of room topics ( #2272 )
...
* Add support for HTML renderings of room topics
Based on extensible events as defined in [MSC1767]
Relates to: vector-im/element-web#5180
Signed-off-by: Johannes Marbach <johannesm@element.io >
[MSC1767]: https://github.com/matrix-org/matrix-spec-proposals/pull/1767
* Use correct MSC
* Add overloads for setRoomTopic
* Fix indentation
* Add more tests to pass the quality gate
Co-authored-by: Johannes Marbach <jm@Johanness-Mini.fritz.box >
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2022-05-16 10:37:34 +01:00
Michael Telatynski
ba1f6ffc84
Tweak thread creation & event adding to fix bugs around relations ( #2369 )
...
* Remove legacy code which caused threads to begin life with too many events
* Update tests & behaviour
2022-05-16 09:01:39 +01:00
Michael Telatynski
72013341db
More sonar tweaks and typing improvements ( #2366 )
...
* More sonar tweaks and typing improvements
* delint
* Write some tests
* Attempt to make TS happy
* Stash tests
* Add tests
* Add `istanbul ignore if` around logging special-case for test env
* Add test
* Comments
2022-05-13 18:08:36 +00:00
Michael Telatynski
4721aa1d24
Fix up more types & Sonar warnings ( #2363 )
...
* Fix up more types & Sonar warnings
* Fix test
* Add first test for callEventHandler
2022-05-12 10:12:39 +01:00
Janne Mareike Koschinski
923ff4b282
registration: add function to re-request email token ( #2357 )
2022-05-11 13:17:36 +02:00
David Baker
83f61c96f3
Merge remote-tracking branch 'origin/develop' into dbkr/group-call-merge
2022-05-10 16:39:07 +01:00
David Baker
85a6a552b5
Make tests pass again
...
Now we know what that bit in the crypto unit test was for...
2022-05-10 16:30:04 +01:00
Travis Ralston
62d77231af
Remove spec v1.3 check for threads ( #2354 )
...
* Remove spec v1.3 check for threads
Citation: https://matrix.to/#/!ewdjhNcPcEmYNKzlWp:t2l.io/$CkPuvKdFZyFL547JCy5J3MfvLaWUo_a1XEdmiop1PKc?via=matrix.org&via=element.io&via=envs.net
* Enable stable support always for threads
* Fix tests differently
2022-05-09 16:11:04 -06:00
David Baker
9702e8a5fa
Remove test 'fix'
...
as I can't work out why it was needed, so I can't justify keeping
it in the group calls merge. It should be PRed to develop separately
if needed.
2022-05-09 22:49:32 +01:00
David Baker
d82c041b99
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
2022-05-09 22:46:43 +01:00
Šimon Brandner
da69ca215b
Implement changes to MSC2285 (private read receipts) ( #2221 )
...
* Add `ReceiptType`
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Implement changes to MSC2285
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Improve tests
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Apply suggestions from review
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Update `getEventReadUpTo()` to handle private read receipts
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Write tests for `getEventReadUpTo()`
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Give `getReadReceiptForUserId()` a JSDOC
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Types!
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
* Try to use receipt `ts`s
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
2022-05-06 21:32:41 +02:00
Michael Telatynski
6b5f4aa0a9
Prune both clear & wire content on redaction ( #2346 )
2022-05-05 07:14:23 +01:00
Šimon Brandner
1cde686a13
MSC3786: Add a default push rule to ignore m.room.server_acl
events ( #2333 )
...
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2022-05-04 16:22:43 +02:00
Michael Telatynski
ac5fee0a69
Fix race conditions around threads ( #2331 )
2022-05-03 14:25:17 +01:00
David Baker
8d9cd0fcb3
Support for PTT group call mode ( #2338 )
...
* Add PTT call mode & mute by default in PTT calls (#2311 )
No other parts of PTT calls implemented yet
* Make the tests pass again (#2316 )
3280394bf9
made call use a bunch of methods that weren't mocked in the tests.
* Add maximum trasmit time for PTT (#2312 )
on sender side by muting mic after the max transmit time has elapsed.
* Don't allow user to unmute if another user is speaking (#2313 )
* Add maximum trasmit time for PTT
on sender side by muting mic after the max transmit time has elapsed.
* Don't allow user to unmute if another user is speaking
Based on https://github.com/matrix-org/matrix-js-sdk/pull/2312
For https://github.com/vector-im/element-call/issues/298
* Fix createGroupCall arguments (#2325 )
Comma instead of a colon...
2022-05-03 13:14:52 +01:00
Kerry
34ee566d88
Live location sharing: handle encrypted messages in processBeaconEvents ( #2327 )
...
* handle encrypted locations
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix processBeaconEvents to handle encrypted events
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-04-28 16:42:37 +02:00
Michael Telatynski
ba06e430c4
Ignore m.replace relations on state events, they're invalid ( #2306 )
...
* Ignore m.replace relations on state events, they're invalid
* Add tests
* Fix test
Co-authored-by: Kerry <kerrya@element.io >
2022-04-26 10:02:36 +00:00
Michael Telatynski
ac08e52410
De-duplicate code and fix types ( #2319 )
2022-04-25 17:15:35 +01:00
Michael Telatynski
e133005b44
Don't decrement the length count of a thread when root redacted ( #2314 )
2022-04-21 16:02:42 +00:00
Michael Telatynski
540514c805
Update threads handling for replies-to-thread-responses as per MSC update ( #2305 )
...
* Update threads handling for replies-to-thread-responses as per MSC update
* Update tests to match new behaviour
2022-04-19 18:15:06 +02:00
Faye Duxovni
db58a66e19
Add method for checking whether our other devices are cross-signed, even when this device isn't ( #2288 )
2022-04-19 15:02:17 +01:00
Kerry
fbe81ad823
Live location sharing - expose room liveBeaconIds ( #2296 )
...
* updates rooms live beacon ids on destroy
Signed-off-by: Kerry Archibald <kerrya@element.io >
* expose live beacons ids
Signed-off-by: Kerry Archibald <kerrya@element.io >
* room state emit all the time on beacon liveness change
Signed-off-by: Kerry Archibald <kerrya@element.io >
* update comment
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-04-14 15:04:43 +02:00
Michael Telatynski
b58d09aa9a
Prevent duplicated re-emitter setups in event-mapper ( #2293 )
2022-04-12 09:42:55 +01:00
Michael Telatynski
286500e335
Fix issues around echo & redaction handling in threads ( #2286 )
2022-04-11 08:58:13 +01:00
Hugh Nimmo-Smith
5937e6a6a8
Support for MSC2457 logout_devices param for setPassword() ( #2285 )
2022-04-09 14:07:33 +01:00
Kerry
f963feab0f
Live location sharing - Aggregate beacon locations on beacons ( #2268 )
...
* add timestamp sorting util
Signed-off-by: Kerry Archibald <kerrya@element.io >
* basic wiring
Signed-off-by: Kerry Archibald <kerrya@element.io >
* quick handle for redacted beacons
Signed-off-by: Kerry Archibald <kerrya@element.io >
* remove fdescribe
Signed-off-by: Kerry Archibald <kerrya@element.io >
* test adding locations
Signed-off-by: Kerry Archibald <kerrya@element.io >
* tidy comments
Signed-off-by: Kerry Archibald <kerrya@element.io >
* test client
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix monitorLiveness for update
Signed-off-by: Kerry Archibald <kerrya@element.io >
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-04-08 12:26:05 +01:00
Kerry
781fdf4fdc
Live location sharing - update beacon_info implementation to latest MSC ( #2281 )
...
* remove M_BEACON_INFO_VARIABLE
Signed-off-by: Kerry Archibald <kerrya@element.io >
* create beacon_info events with non-variable event type
Signed-off-by: Kerry Archibald <kerrya@element.io >
* remove isBeaconInfoEventType
Signed-off-by: Kerry Archibald <kerrya@element.io >
* refer to msc3673 instead of msc3489
Signed-off-by: Kerry Archibald <kerrya@element.io >
* remove event type suffix
Signed-off-by: Kerry Archibald <kerrya@element.io >
* update beacon identifier to use state key
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix beacon spec
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix room-state tests
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add beacon identifier
Signed-off-by: Kerry Archibald <kerrya@element.io >
* dont allow update to older beacon event
Signed-off-by: Kerry Archibald <kerrya@element.io >
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io >
* unnest beacon_info content
Signed-off-by: Kerry Archibald <kerrya@element.io >
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io >
* check redaction event id
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-04-08 10:50:06 +02:00
Michael Telatynski
dde4285cdf
Fix handling of threaded messages around edits & echoes ( #2267 )
2022-04-07 13:46:50 +01:00
Kerry
71b7521f42
Live location sharing - handle redacted beacons ( #2269 )
...
* emit beacon destroy event on destroy
Signed-off-by: Kerry Archibald <kerrya@element.io >
* handle redacted beacon events in room-state
Signed-off-by: Kerry Archibald <kerrya@element.io >
* empty line
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-04-04 10:17:49 +02:00
Michael Telatynski
d6f1c6cfdc
Fix thread & main timeline partitioning logic ( #2264 )
2022-03-31 13:57:37 +01:00
Andy Balaam
f03a391f80
Prevent exception 'Unable to set up secret storage' ( #2260 )
2022-03-28 11:48:34 +01:00
Michael Telatynski
c541b3f1ce
Fix issues with duplicated MatrixEvent objects around threads ( #2256 )
2022-03-24 12:24:19 +00:00
Kerry
a6fe8797f0
Use beacon info event type as beacon identifier ( #2251 )
...
* use beacon info event type as beacon identifier
Signed-off-by: Kerry Archibald <kerrya@element.io >
* test cases
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-22 11:14:43 +01:00
Kerry
a3f5ec1ba2
reemit beacon events ( #2245 )
...
* reemit beacon events
Signed-off-by: Kerry Archibald <kerrya@element.io >
* use specific imports
Signed-off-by: Kerry Archibald <kerrya@element.io >
* Update src/models/room-state.ts
Co-authored-by: Travis Ralston <travisr@matrix.org >
Co-authored-by: Travis Ralston <travisr@matrix.org >
2022-03-18 08:56:53 +00:00
Kerry
524322280b
add upsert function for updating beacon events ( #2247 )
...
* add upsert function for updating beacon events
Signed-off-by: Kerry Archibald <kerrya@element.io >
* expose event type on beacon model
Signed-off-by: Kerry Archibald <kerrya@element.io >
* allow setting timestamp in beaconinfo content helper
Signed-off-by: Kerry Archibald <kerrya@element.io >
* expose parsed beacon info
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-18 09:52:27 +01:00
Kerry
18943d6519
emit aggregate room beacon liveness ( #2241 )
...
* emit aggregate room beacon liveness
Signed-off-by: Kerry Archibald <kerrya@element.io >
* tidy and comment
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add export for models/beacon
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add owner and roomId
Signed-off-by: Kerry Archibald <kerrya@element.io >
* copyright
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-16 08:54:13 +00:00
Kerry
c2fdb4478d
Live location sharing - create m.beacon_info events ( #2238 )
...
* add content helpers
Signed-off-by: Kerry Archibald <kerrya@element.io >
* stubbed Beacon class
Signed-off-by: Kerry Archibald <kerrya@element.io >
* beacon test utils
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add beacon test utils
Signed-off-by: Kerry Archibald <kerrya@element.io >
* copyrights
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add beacons to room state
Signed-off-by: Kerry Archibald <kerrya@element.io >
* tidy comments
Signed-off-by: Kerry Archibald <kerrya@element.io >
* unit test RoomState.setBeacon
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-15 10:31:32 +01:00
Kerry
57d71ccd0f
Move test-utils into a directory ( #2236 )
...
* move test-utils.js into directory
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix imports
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-14 14:55:11 +01:00
Kerry
d064d82fcc
Beacon event types from MSC3489 ( #2230 )
...
* ASSET_NODE_TYPE -> M_ASSET
Signed-off-by: Kerry Archibald <kerrya@element.io >
* export const M_TIMESTAMP = new UnstableValue("m.ts", "org.matrix.msc3488.ts");
Signed-off-by: Kerry Archibald <kerrya@element.io >
* LOCATION_EVENT_TYPE -> M_LOCATION
Signed-off-by: Kerry Archibald <kerrya@element.io >
* extensible event types for location
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add locationevent parsing helpers
Signed-off-by: Kerry Archibald <kerrya@element.io >
* rename
Signed-off-by: Kerry Archibald <kerrya@element.io >
* comment
Signed-off-by: Kerry Archibald <kerrya@element.io >
* revert makelocationcontent signature
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add beacon event types
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add variable* to type and comment
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add content helper functions for beacon_info and beacon
Signed-off-by: Kerry Archibald <kerrya@element.io >
* copyright
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add m.beacon_info.live from msc3672
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-14 12:13:28 +00:00
Hubert Chathi
17f3920ddd
Send and handle stable name for withheld codes ( #2232 )
...
since MSC2399 is finished FCP and it's in the spec, we can use the stable name
now
2022-03-11 16:21:06 -05:00
Germain
9058dbf289
Switch to using stable values for Threads ( #2228 )
2022-03-11 09:04:17 +00:00
Kerry
e16e7bc098
Location event helper functions ( #2229 )
...
* ASSET_NODE_TYPE -> M_ASSET
Signed-off-by: Kerry Archibald <kerrya@element.io >
* export const M_TIMESTAMP = new UnstableValue("m.ts", "org.matrix.msc3488.ts");
Signed-off-by: Kerry Archibald <kerrya@element.io >
* LOCATION_EVENT_TYPE -> M_LOCATION
Signed-off-by: Kerry Archibald <kerrya@element.io >
* extensible event types for location
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add locationevent parsing helpers
Signed-off-by: Kerry Archibald <kerrya@element.io >
* rename
Signed-off-by: Kerry Archibald <kerrya@element.io >
* comment
Signed-off-by: Kerry Archibald <kerrya@element.io >
* revert makelocationcontent signature
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-10 18:40:13 +01:00
Germain
dbcd01bb43
Fix missing threads in thread list ( #2226 )
...
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2022-03-10 16:44:42 +00:00
Michael Telatynski
70efed1a58
Add test coverage around push rules with no conditions ( #2219 )
2022-03-04 14:03:35 +00:00
Kerry
6bc584ba8b
add LocationAssetType enum ( #2214 )
...
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-03 10:49:16 +01:00
Germain
4e4afdb795
Update thread info after MSC3440 updates ( #2209 )
2022-03-02 10:52:08 +00:00
Germain
b782dee2ef
Partition root event in thread and room timeline ( #2210 )
2022-03-01 13:04:24 +00:00