From 5c6bfec916773cce78750ac3a91adaceaf7fdfc4 Mon Sep 17 00:00:00 2001 From: Andrei Smirnov Date: Thu, 9 Sep 2021 11:07:28 +0300 Subject: [PATCH] Added --uri command line argument --- status/constants.nim | 1 + status/libstatus/accounts/constants.nim | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/status/constants.nim b/status/constants.nim index 1a58ccd..b356974 100644 --- a/status/constants.nim +++ b/status/constants.nim @@ -1,5 +1,6 @@ import libstatus/accounts/constants +export OPENURI export DATADIR export STATUSGODIR export KEYSTOREDIR diff --git a/status/libstatus/accounts/constants.nim b/status/libstatus/accounts/constants.nim index c52a2c6..1672ef1 100644 --- a/status/libstatus/accounts/constants.nim +++ b/status/libstatus/accounts/constants.nim @@ -209,6 +209,10 @@ type StatusDesktopConfig = object defaultValue: defaultDataDir() desc: "Status Desktop data directory" abbr: "d" .}: string + uri* {. + defaultValue: "" + desc: "status-im:// URI to open a chat or other" + name: "uri" .}: string # On macOS the first time when a user gets the "App downloaded from the # internet" warning, and clicks the Open button, the OS passes a unique process @@ -224,6 +228,7 @@ let desktopConfig = StatusDesktopConfig.load(cliParams) let baseDir = absolutePath(expandTilde(desktopConfig.dataDir)) + OPENURI* = desktopConfig.uri DATADIR* = baseDir & sep STATUSGODIR* = joinPath(baseDir, "data") & sep KEYSTOREDIR* = joinPath(baseDir, "data", "keystore") & sep