Commit Graph

46 Commits (7ccc429beaa1c49d4d94b7f1f68c8b115fd5a53f)

Author SHA1 Message Date
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Aaron Raimist 946416cf87
Make serverCandidates optional
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-06-07 17:09:56 -05:00
Aaron Raimist a5bf17ff65
Revert incorrect change to forShareableRoom
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-06-07 16:54:41 -05:00
Aaron Raimist ccdd2311f4
Make "share this room" use aliases if possible
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-05-29 01:38:47 -05:00
Aaron Raimist 53ebf3b8e3
Don't include via when sharing room alias
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-05-29 01:37:22 -05:00
Michael Telatynski dd04b479a1 Wrap decodeURIComponent in try-catch to protect against malformed URIs 2021-05-13 10:20:27 +01:00
Travis Ralston f0f875d1e2 Merge branch 'develop' into handle-encoded-urls 2021-04-28 09:53:16 -06:00
J. Ryan Stinnett b8203043be Add types to Permalinks 2021-04-27 12:11:23 +01:00
J. Ryan Stinnett b8a915bb76 Tweak private / underscores for fields and methods 2021-04-26 14:02:53 +01:00
J. Ryan Stinnett d7e6f4b4b5 Add basic types 2021-04-23 17:05:50 +01:00
J. Ryan Stinnett 31a28b1a9e Update extensions for some files with types
This migrates one bucket of files using some amount of Flow typing to mark them
as TypeScript instead. The remaining type errors are fixed in subsequent
commits.
2021-04-23 16:05:30 +01:00
Jaiwanth f2d0a56c1f Handle encoded matrix urls
Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>
2021-04-22 16:54:51 +05:30
Michael Telatynski 1a7a0e619d extend createRoom for creating rooms in a space 2021-03-01 19:05:50 +00:00
J. Ryan Stinnett 474c029db5 Fix permalink via parsing for rooms
This adjusts the app local link parsing path to better handle `via`s in query
params. Previously this path only expected them when an event ID was also
present, but it's also valid to have `via`s without event IDs as well.

Fixes https://github.com/vector-im/element-web/issues/16345
2021-02-03 15:18:19 +00:00
J. Ryan Stinnett fd7c50f683 Move route splitting inside route parsing 2021-02-03 14:05:22 +00:00
J. Ryan Stinnett fa3ace8473 Rework message pilling to ignore event permalinks
This removes pills from event permalinks since they hide the text associated
with the link, which can cause nonsensical messages since words have been
removed. In addition, this moves away from fragile regexs to more
straightforward code to parse links and adds a test for this case.

Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/5188
Fixes https://github.com/vector-im/element-web/issues/15159
2021-01-27 11:46:20 +00:00
J. Ryan Stinnett 162a5de82e Rename and reformat Element URL pattern
This is just a code style cleanup. There are no behaviour changes in this
commit.
2020-12-21 13:05:45 +00:00
Simon Merrick 5544ee6408 extract alias handling to separate function 2020-12-06 23:29:11 +13:00
Simon Merrick cf8c98e076 More explicit reference checking 2020-12-02 12:34:43 +13:00
Simon Merrick e92ac67152 Use room alias in generated permalink for rooms
Signed-off-by: Simon Merrick <s.m3rrick@gmail.com>
2020-11-28 21:50:51 +13:00
Travis Ralston dacc7bc111 Rebrand Riot -> Element in the permalink classes 2020-11-02 21:46:48 -07:00
Michael Telatynski 1b99c11b11 tidy 2020-09-08 15:09:45 +01:00
Michael Telatynski d0c716d61c Fix permalink local linkification to not strip via servers 2020-09-08 10:26:37 +01:00
Travis Ralston d820356990 Convert alias links in room header topics to local permalinks
Fixes https://github.com/vector-im/riot-web/issues/12605
2020-03-04 13:56:58 -07:00
Travis Ralston f1ac3d2f64 Convert imports to ES6 from CommonJS
This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
2019-12-22 21:16:06 -07:00
Travis Ralston 042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston 806d728d59 Import from the js-sdk's src/ directory
Because ES6 and such.
2019-12-22 21:14:33 -07:00
Travis Ralston be4eeb5e07 Fix js-sdk imports for new module 2019-12-22 21:10:26 -07:00
Michael Telatynski 857f086501 Fix ?via= args in SpecPermalinkConstructor.js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-03 00:05:19 +00:00
N-Pex d403ed7513 Fix linkify imports
VECTOR_URL_PATTERN was 'undefined' inside Permalinks.tryTransformPermalinkToLocalHref()
2019-11-06 10:41:14 +01:00
Travis Ralston 6b09c3e9e6 Appease the linter 2019-09-30 21:03:16 -06:00
Travis Ralston fc66e69c02 Rename RoomPermalinkCreator -> Permalinks due to scope
The file handles more than just a RoomPermalinkCreator, so we should name it accordingly.
2019-09-30 20:39:58 -06:00
Travis Ralston ce0a534db1 Fix pills for CIDER too 2019-09-30 20:37:24 -06:00
Travis Ralston 2824f468d9 Update pill processing to handle better permalinks 2019-09-30 20:27:51 -06:00
Travis Ralston 2cb0b4903a Converge on permalink processing for HtmlUtils and linkify-matrix 2019-09-30 20:17:54 -06:00
Travis Ralston ff4eee5239 Minor cleanup of getPermalinkConstructor 2019-09-30 16:09:19 -06:00
Travis Ralston 8acaa3ce95 Update generated Riot permalinks
Also adds some safety around the Riot URL to ensure it mostly looks like a URL
2019-09-30 16:05:28 -06:00
Travis Ralston 199dfa7bf9 Always check if the permalink is a spec permalink
See code for rationale
2019-09-30 16:04:49 -06:00
Travis Ralston 3e5a39d646 Add utility function for permalink parsing 2019-09-30 16:04:22 -06:00
Travis Ralston 9bb1ebb89d Support riot-level permalink parsing 2019-09-30 16:03:52 -06:00
Travis Ralston baf78da791 Support spec-level permalink parsing 2019-09-30 16:03:24 -06:00
Travis Ralston f183e96d66 Introduce a RiotPermalinkConstructor and fix the setting name
Originally we were planning on using the current location as the permalink prefix, but that doesn't work if the user is a desktop user.
2019-09-30 13:04:20 -06:00
Travis Ralston f879185aef Move permalink host check into permalink constructors
Without the requirement for a room to work
2019-09-30 12:53:45 -06:00
Travis Ralston 926e1146f9 Move spec permalinks into their own class
This allows for Riot permalinks to be introduced without if-else ladders everywhere.
2019-09-30 12:51:17 -06:00
Travis Ralston f9d5e89017 Move early parts of matrix.to bits into its own class 2019-09-30 12:37:13 -06:00
Travis Ralston 64aa6695f5 Move matrix-to.js to utils/permalinks/RoomPermalinkCreator
Just a little bit of refactoring to make the feature of custom prefixes a bit easier.
2019-09-30 12:16:46 -06:00