Add display of access token after user creation for double puppeting in bridges
This commit is contained in:
parent
2b6930fb49
commit
221239fc17
@ -85,6 +85,9 @@ The script will:
|
||||
- Prompt you for a username.
|
||||
- Ask if the user should be an admin.
|
||||
- Create the account in your Dendrite server.
|
||||
- Display an access token.
|
||||
|
||||
**Important**: Save the access token displayed after user creation! You'll need it to enable double puppeting in the WhatsApp, Telegram, and Discord bridges. Double puppeting allows messages you send through the original apps to appear as coming from your Matrix account.
|
||||
|
||||
You can run this script multiple times to create additional users as needed.
|
||||
|
||||
|
@ -107,6 +107,18 @@ You should see messages indicating the bridge has started successfully. If the c
|
||||
- Add the bot to your server.
|
||||
- Link your Discord account.
|
||||
|
||||
## Double Puppeting
|
||||
|
||||
Double puppeting makes messages you send from Discord appear as coming from your Matrix account. To enable it:
|
||||
|
||||
1. You'll need the access token that was displayed when you created your Matrix user with the create-user.sh script.
|
||||
2. Start a private chat with `@discordbot:your.domain.com`.
|
||||
3. Send the command: `login-matrix <access-token>`.
|
||||
(Replace `<access-token>` with your saved access token from create-user.sh).
|
||||
4. The bot should confirm successful double puppeting setup.
|
||||
|
||||
Note: If you've lost your access token, you can generate a new one using Element or another Matrix client in Settings > Help & About > Access Token.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
1. **Bridge Not Starting**
|
||||
|
@ -124,6 +124,19 @@ You should see messages indicating the bridge has started successfully. If the c
|
||||
- Enter the verification code sent to your Telegram app.
|
||||
- Complete two-factor authentication if enabled.
|
||||
|
||||
## Double Puppeting
|
||||
|
||||
Double puppeting allows messages sent from Telegram to appear as coming from your Matrix account. To enable it:
|
||||
|
||||
1. You'll need the access token that was displayed when you created your Matrix user with the create-user.sh script.
|
||||
2. Start a private chat with `@telegrambot:your.domain.com`.
|
||||
3. Send the command: `login-matrix` (without the access token).
|
||||
4. When prompted, send your access token in a separate message.
|
||||
(This is the access token that was saved from create-user.sh).
|
||||
5. The bot should confirm successful double puppeting setup.
|
||||
|
||||
Note: If you've lost your access token, you can generate a new one using Element or another Matrix client in Settings > Help & About > Access Token.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
1. **Bridge Not Starting**
|
||||
|
@ -112,6 +112,18 @@ You should see messages indicating the bridge has started successfully. If the c
|
||||
- Scan the QR code displayed in Matrix.
|
||||
5. Wait for the confirmation message.
|
||||
|
||||
## Double Puppeting
|
||||
|
||||
Double puppeting makes messages you send from WhatsApp appear as coming from your Matrix account instead of a ghost user. To enable it:
|
||||
|
||||
1. You'll need the access token that was displayed when you created your Matrix user with the create-user.sh script.
|
||||
2. Start a private chat with `@whatsappbot:your.domain.com`.
|
||||
3. Send the command: `login-matrix <access-token>`.
|
||||
(Replace `<access-token>` with your saved access token from create-user.sh).
|
||||
4. The bot should confirm successful double puppeting setup.
|
||||
|
||||
Note: If you've lost your access token, you can generate a new one using Element or another Matrix client in Settings > Help & About > Access Token.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
1. **Bridge Not Starting**
|
||||
|
@ -19,16 +19,20 @@ while true; do
|
||||
esac
|
||||
done
|
||||
|
||||
# Execute the create-account command
|
||||
echo "Creating user: $USERNAME"
|
||||
docker compose exec monolith /usr/bin/create-account \
|
||||
OUTPUT=$(docker compose exec -T monolith /usr/bin/create-account \
|
||||
-config /etc/dendrite/dendrite.yaml \
|
||||
-username "$USERNAME" \
|
||||
$ADMIN_FLAG
|
||||
$ADMIN_FLAG)
|
||||
|
||||
# Check if the command was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User \"$USERNAME\" created successfully!"
|
||||
echo
|
||||
echo "Access Token (save this for double puppeting):"
|
||||
echo "$OUTPUT" | grep -o "Access token: .*" | cut -d' ' -f3-
|
||||
echo
|
||||
echo "Make sure to save this access token! You'll need it to enable double puppeting in the bridges."
|
||||
else
|
||||
echo "Error: Failed to create user"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user