Skip to content

Commit

Permalink
added --verify manual-user and renamed --verify manual to --verify ma…
Browse files Browse the repository at this point in the history
…nual-device

incompatible as in --verify manual is now renamed to --verify manual-device
  • Loading branch information
8go committed Sep 4, 2024
1 parent 9f95161 commit 4151f3c
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 74 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[package]
name = "matrix-commander"
version = "0.5.0"
version = "0.6.0"
edition = "2021"
description = "simple but convenient CLI-based Matrix client app for sending and receiving"
documentation = "https://docs.rs/matrix-commander"
Expand Down
54 changes: 32 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ Safe!
Welcome to "matrix-commander-rs", a Matrix CLI client. ─── On the first run use
--login to log in, to authenticate. On the second run we suggest to use
--verify to get verified. Manual verification is built-in and can be used to
verify devices. Or combine both --login and --verify in the first run. On
further runs "matrix-commander-rs" implements a simple Matrix CLI client that
can send messages or files, listen to messages, operate on rooms, etc. ───
─── This project is currently only a vision. The Python package
verify devices and users. Or combine both --login and --verify in the first
run. On further runs "matrix-commander-rs" implements a simple Matrix CLI
client that can send messages or files, listen to messages, operate on rooms,
etc. ─── ─── This project is currently only a vision. The Python package
"matrix-commander" exists. The vision is to have a compatible program in Rust.
I cannot do it myself, but I can coordinate and merge your pull requests. Have
a look at the repo "https://github.com/8go/matrix-commander-rs/". Please help!
Expand Down Expand Up @@ -253,16 +253,23 @@ Options:
--verify <VERIFICATION_METHOD>
Perform account verification. Details:: By default, no verification
is performed. Verification is currently offered via Manual, Emoji and
EmojiReq. Manual verification is simpler but does less. Try:
'--bootstrap --password mypassword --verify manual'. Manual only
verfies devices one-directionally. See
is performed. Verification is currently offered via Manual-Device,
Manual-User, Emoji and Emoji-Req. Manual verification is simpler but
does less. Try: '--bootstrap --password mypassword --verify
manual-device' or '--bootstrap --password mypassword --verify
manual-user'. Manual only verfies devices or users one-directionally.
See
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.Device.html#method.verify
for more info on Manual verification. One can first do 'manual'
verification and then 'emoji' or 'emojireq' verification. Both
'emoji' as well as 'emojireq' perform emoji verification. With
and
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.UserIdentity.html#method.verify
for more info on Manual verification. manual-device can only verify
its own devices, notother users' devices. manual-user can trust other
users. So, with verify-user also use the --user option to specify one
or multiple users. One can first do 'manual-device' and 'manual-user'
verification and then 'emoji' or 'emoji-req' verification. Both
'emoji' as well as 'emoji-req' perform emoji verification. With
'emoji' we send a request to some other client to request
verification from their device. With 'emojireq' we wait for some
verification from their device. With 'emoji-req' we wait for some
other client to request verification from us. If verification is
desired, run this program in the foreground (not as a service) and
without a pipe. While verification is optional it is highly
Expand All @@ -288,28 +295,31 @@ Options:
that the matrix-commander-rs device is now green and verified. In the
terminal you should see a text message indicating success. It has
been tested with Element app on cell phone and Element webpage in
browser. Verification is done one device at a time. 'emojireq' is
browser. Verification is done one device at a time. 'emoji-req' is
similar. You must specify a user with --user and a device with
--device to specify to which device you want to send the verification
request. On the other device you get a pop up and you must accept the
verification request. 'emojireq' seems to have problems, e.g.
'emojireq' does not seem to work with Element phone app
verification request. 'emoji-req' seems to have problems, e.g.
'emoji-req' does not seem to work with Element phone app
[default: none]
Possible values:
- none: None: option not used, no verification done
- manual: Manual: manual verification See also:
- none: None: option not used, no verification done
- manual-device: ManualDevice: manual device verification See also:
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.Device.html#method.verify
- emoji: Emoji: verify via emojis as the recipient
- emoji-req: Emoji: verify via emojis as the initiator
- manual-user: ManualUser: manual user verification See also:
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.UserIdentity.html#method.verify
- emoji: Emoji: verify via emojis as the recipient
- emoji-req: Emoji: verify via emojis as the initiator
--bootstrap
Details:: By default, no bootstrapping is performed. Bootstrapping is
useful for verification. --bootstrap creates cross signing keys. If
you have trouble verifying with --verify manual, use --bootstrap
before. Use --password to provide password. If --password is not
given it will read password from command line (stdin). See also
you have trouble verifying with --verify manual-device or --verify
manual-user, use --bootstrap before. Use --password to provide
password. If --password is not given it will read password from
command line (stdin). See also
https://docs.rs/matrix-sdk/0.7.1/matrix_sdk/encryption/struct.CrossSigningStatus.html#fields
--logout <DEVICE>
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.6.0
54 changes: 32 additions & 22 deletions help.manual.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Welcome to "matrix-commander-rs", a Matrix CLI client. ─── On the first run use
--login to log in, to authenticate. On the second run we suggest to use
--verify to get verified. Manual verification is built-in and can be used to
verify devices. Or combine both --login and --verify in the first run. On
further runs "matrix-commander-rs" implements a simple Matrix CLI client that
can send messages or files, listen to messages, operate on rooms, etc. ───
─── This project is currently only a vision. The Python package
verify devices and users. Or combine both --login and --verify in the first
run. On further runs "matrix-commander-rs" implements a simple Matrix CLI
client that can send messages or files, listen to messages, operate on rooms,
etc. ─── ─── This project is currently only a vision. The Python package
"matrix-commander" exists. The vision is to have a compatible program in Rust.
I cannot do it myself, but I can coordinate and merge your pull requests. Have
a look at the repo "https://github.com/8go/matrix-commander-rs/". Please help!
Expand Down Expand Up @@ -143,16 +143,23 @@ Options:

--verify <VERIFICATION_METHOD>
Perform account verification. Details:: By default, no verification
is performed. Verification is currently offered via Manual, Emoji and
EmojiReq. Manual verification is simpler but does less. Try:
'--bootstrap --password mypassword --verify manual'. Manual only
verfies devices one-directionally. See
is performed. Verification is currently offered via Manual-Device,
Manual-User, Emoji and Emoji-Req. Manual verification is simpler but
does less. Try: '--bootstrap --password mypassword --verify
manual-device' or '--bootstrap --password mypassword --verify
manual-user'. Manual only verfies devices or users one-directionally.
See
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.Device.html#method.verify
for more info on Manual verification. One can first do 'manual'
verification and then 'emoji' or 'emojireq' verification. Both
'emoji' as well as 'emojireq' perform emoji verification. With
and
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.UserIdentity.html#method.verify
for more info on Manual verification. manual-device can only verify
its own devices, notother users' devices. manual-user can trust other
users. So, with verify-user also use the --user option to specify one
or multiple users. One can first do 'manual-device' and 'manual-user'
verification and then 'emoji' or 'emoji-req' verification. Both
'emoji' as well as 'emoji-req' perform emoji verification. With
'emoji' we send a request to some other client to request
verification from their device. With 'emojireq' we wait for some
verification from their device. With 'emoji-req' we wait for some
other client to request verification from us. If verification is
desired, run this program in the foreground (not as a service) and
without a pipe. While verification is optional it is highly
Expand All @@ -178,28 +185,31 @@ Options:
that the matrix-commander-rs device is now green and verified. In the
terminal you should see a text message indicating success. It has
been tested with Element app on cell phone and Element webpage in
browser. Verification is done one device at a time. 'emojireq' is
browser. Verification is done one device at a time. 'emoji-req' is
similar. You must specify a user with --user and a device with
--device to specify to which device you want to send the verification
request. On the other device you get a pop up and you must accept the
verification request. 'emojireq' seems to have problems, e.g.
'emojireq' does not seem to work with Element phone app
verification request. 'emoji-req' seems to have problems, e.g.
'emoji-req' does not seem to work with Element phone app

[default: none]

Possible values:
- none: None: option not used, no verification done
- manual: Manual: manual verification See also:
- none: None: option not used, no verification done
- manual-device: ManualDevice: manual device verification See also:
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.Device.html#method.verify
- emoji: Emoji: verify via emojis as the recipient
- emoji-req: Emoji: verify via emojis as the initiator
- manual-user: ManualUser: manual user verification See also:
https://docs.rs/matrix-sdk/0.7/matrix_sdk/encryption/identities/struct.UserIdentity.html#method.verify
- emoji: Emoji: verify via emojis as the recipient
- emoji-req: Emoji: verify via emojis as the initiator

--bootstrap
Details:: By default, no bootstrapping is performed. Bootstrapping is
useful for verification. --bootstrap creates cross signing keys. If
you have trouble verifying with --verify manual, use --bootstrap
before. Use --password to provide password. If --password is not
given it will read password from command line (stdin). See also
you have trouble verifying with --verify manual-device or --verify
manual-user, use --bootstrap before. Use --password to provide
password. If --password is not given it will read password from
command line (stdin). See also
https://docs.rs/matrix-sdk/0.7.1/matrix_sdk/encryption/struct.CrossSigningStatus.html#fields

--logout <DEVICE>
Expand Down
7 changes: 4 additions & 3 deletions scripts/workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,16 @@ done

PS3='Please enter your choice: '
OPT1="git status # what is the current status"
OPT2="cargo package --list # show files containing changes"
OPT2="git add Cargo.lock Cargo.toml README.md VERSION help.manual.txt src/main.rs src/mclient.rs"
OPT3="cargo package --list # show files containing changes"
OPTC="Continue"
OPTQ="Quit"
options=("$OPT1" "$OPT2" "$OPTC" "$OPTQ")
options=("$OPT1" "$OPT2" "$OPT3" "$OPTC" "$OPTQ")
select opt in "${options[@]}"; do
if [ "${REPLY,,}" == "c" ]; then opt="$OPTC"; fi
if [ "${REPLY,,}" == "q" ]; then opt="$OPTQ"; fi
case ${opt} in
"$OPT1" | "$OPT2" )
"$OPT1" | "$OPT2" | "$OPT3" )
OPTE=${opt%%#*} # remove everything after first #
echo "Performing: $OPTE"
$OPTE
Expand Down
Loading

0 comments on commit 4151f3c

Please sign in to comment.