Skip to content

Commit

Permalink
Update deep linking
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Aug 27, 2024
1 parent 1a14b1e commit 4f2dfc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/app-lib/src/api/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ pub async fn handle_url(sublink: &str) -> crate::Result<CommandPayload> {
pub async fn parse_command(
command_string: &str,
) -> crate::Result<CommandPayload> {
tracing::info!("Parsing command: {}", &command_string);
tracing::debug!("Parsing command: {}", &command_string);

// modrinth://some-command
// This occurs when following a web redirect link
if let Some(sublink) = command_string.strip_prefix("modrinth://") {
tracing::info!("Sublink: {sublink}");
Ok(handle_url(sublink).await?)
} else {
// We assume anything else is a filepath to an .mrpack file
Expand Down

0 comments on commit 4f2dfc4

Please sign in to comment.