Devicelist helper
This commit is contained in:
parent
1dd4682029
commit
c7c5e86b9e
5
Makefile
5
Makefile
@ -1,5 +0,0 @@
|
||||
all:
|
||||
@printf "Nothing to make. Run \"make install\" instead.\n"
|
||||
|
||||
install:
|
||||
install -D -m744 src/omemo-qrcode-gen "/usr/local/bin/omemo-qrcode-gen"
|
@ -20,3 +20,11 @@ Example:
|
||||
# This will put the string into stdout
|
||||
./omemo-qrcode-gen bandie@example.com 9876543210 12345678 ABCDEF12 12345678 ABCDEF12 12345678 ABCDEF12 12345678 ABCDEF12 stdout
|
||||
```
|
||||
|
||||
If you don't see your device ID's you can use `omemo-gen-get-devicelist-of` to copy paste it into an XMPP console.
|
||||
|
||||
it will be like
|
||||
|
||||
```console
|
||||
# ./omemo-gen-get-devicelist-of <account you want to see the devicelist of>
|
||||
```
|
||||
|
30
src/omemo-gen-get-devicelist-of
Executable file
30
src/omemo-gen-get-devicelist-of
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONFIG_DIR="$HOME/.config"
|
||||
CONFIG="$CONFIG_DIR/jabberdevlistscript"
|
||||
|
||||
if ! [ -e "$CONFIG" ]; then
|
||||
read -p "FROM is not set. Enter your Jabber ID: " FROM
|
||||
mkdir -p $CONFIG_DIR
|
||||
echo "FROM=$FROM" > $CONFIG
|
||||
echo "If you want to change your FROM later, just edit or remove $CONFIG"
|
||||
else
|
||||
source $CONFIG
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "$0: Missing argument."
|
||||
echo "Usage: $0 [ Jabber ID of wished device list ]"
|
||||
echo "Config file: $CONFIG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$CONFIG loaded."
|
||||
|
||||
echo "
|
||||
<iq type='get' from='$FROM' to='$1' id='fetch1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<items node='eu.siacs.conversations.axolotl.devicelist'/>
|
||||
</pubsub>
|
||||
</iq>
|
||||
"
|
Loading…
Reference in New Issue
Block a user