Travis Ralston
1584ab42c2
Support a backup room ID in PermalinkCreator
...
In the case of room upgrades, it is possible the client is trying to render the room create event, but the user has never been in the old room. This results in an error because the PermalinkCreator cannot possibly figure out a room ID.
Instead, we'll feed the creator an alternate room ID to try if the room object can't be provided.
Fixes https://github.com/vector-im/riot-web/issues/9636
2019-05-13 14:12:58 -06:00
Travis Ralston
e4a9d4f5c8
Cache permalink creators out of the component's state
2019-04-09 12:01:09 -06:00
Travis Ralston
b8551f00b2
Prevent the permalink creator from causing cascading failure
2019-04-05 15:39:04 -06:00
Matthew Hodgson
b9eebee13b
turn NPE into a throw
2019-04-04 16:53:17 +01:00
Matthew Hodgson
1153ce43c6
fix NPE for rooms with redacted tombstones
2019-04-03 20:38:25 +01:00
Bruno Windels
a7db42c6cf
use nesting instead of short-circuited && operator
2019-02-25 18:43:08 +01:00
Bruno Windels
be3d12721c
check room exists
2019-02-25 18:43:08 +01:00
Bruno Windels
fe71c17bb7
keep previous >= pl limit
2019-02-25 18:43:08 +01:00
Bruno Windels
63504fcc17
dont assume there are powerlevels set
2019-02-25 18:43:08 +01:00
Bruno Windels
f97ea37717
permalink is one word
2019-02-25 18:43:08 +01:00
Bruno Windels
db5a2138ea
this is dead code actually, can go
2019-02-25 18:43:08 +01:00
Bruno Windels
ed4960f1c5
nicer formatting
2019-02-25 18:43:08 +01:00
Bruno Windels
b9c3919dc1
calculate highest pl from load!
2019-02-25 18:43:08 +01:00
Bruno Windels
35809dc7d5
also update highest power level when acls come in
2019-02-25 18:43:08 +01:00
Bruno Windels
12f55391db
observe powerlevels from state event, less handlers this way
2019-02-25 18:43:08 +01:00
Bruno Windels
29be28919d
create permalink creator in roomview and pass it on to the event tiles
2019-02-25 18:43:08 +01:00
Bruno Windels
8d929add18
delegate to class when needing a roomId permalink
2019-02-25 18:43:08 +01:00
Bruno Windels
d4c6198fa3
update copyright
2019-02-25 18:43:08 +01:00
Bruno Windels
d3f0b609f5
use URL instead of creating new a element
2019-02-25 18:43:08 +01:00
Bruno Windels
c2791b9470
refactor pickServerCandidates into statefull class
...
so we don't need to iterate over all members for every permalink
2019-02-25 18:43:08 +01:00
Travis Ralston
45bc1f7dbd
Appease the linter
2018-12-05 18:14:22 -07:00
Travis Ralston
f08a54ed1e
Don't consider ACL'd servers as permalink candidates
...
and fix the bug where it was picking 4 servers instead of 3. This was due to `<=` instead of `<` in the `MAX_SERVER_CANDIDATES` loop. Added tests for all the things.
Fixes https://github.com/vector-im/riot-web/issues/7752
Fixes https://github.com/vector-im/riot-web/issues/7682
2018-12-05 18:00:09 -07:00
Travis Ralston
5b22d157a7
Fix candidate server encoding
2018-10-26 20:34:06 -06:00
Travis Ralston
3bc5e2beb3
Fix and test matrix.to alias permalinks
...
Fixes https://github.com/vector-im/riot-web/issues/7614
Regression of https://github.com/matrix-org/matrix-react-sdk/pull/2250
2018-10-26 19:47:53 -06:00
Travis Ralston
0857e2c5e9
Clarify why we pick popular servers over the one that created the room
2018-10-26 12:21:27 -06:00
Travis Ralston
3734c8ab91
Don't mention that matrix.org is likely to be popular
...
This is untrue for quite a few real scenarios, including private federations and a ton of rooms.
2018-10-26 12:21:02 -06:00
Travis Ralston
d802ee0fa2
Move the max candidates constant out of the function
2018-10-26 10:25:23 -06:00
Travis Ralston
c389540522
Appease the linter
2018-10-26 10:22:18 -06:00
Travis Ralston
52094964a0
Fix the server candidate picker to actually work
...
Tests do wonders.
2018-10-25 15:23:15 -06:00
Travis Ralston
e8cb636631
Pick servers for ?via on matrix.to links based on some heuristics
2018-10-24 18:01:08 -06:00
Michael Telatynski
3ebec92ac5
replace hardcoded matrix.to
with reference to const in matrix-to
...
for easier changing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-16 08:27:47 +01:00
Michael Telatynski
0f85391587
Implement Rich Quoting/Replies
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-12-10 12:50:41 +00:00