Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed1280a415 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": "1.2.2",
|
"version": "2.0.0",
|
||||||
"upstreamVersion": "0.12.4",
|
"upstreamVersion": "0.2510.0",
|
||||||
"id": "dev.maunium.whatsapp.cloudronapp",
|
"id": "dev.maunium.whatsapp.cloudronapp",
|
||||||
"title": "Matrix WhatsApp Bridge",
|
"title": "Matrix WhatsApp Bridge",
|
||||||
"author": "Tulir Asokan <tulir@maunium.net>",
|
"author": "Tulir Asokan <tulir@maunium.net>",
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ RUN mkdir -p /app/code /app/pkg /app/data
|
|||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
# Download and build mautrix-whatsapp
|
# Download and build mautrix-whatsapp
|
||||||
RUN git clone --branch v0.12.4 https://github.com/mautrix/whatsapp.git . \
|
RUN git clone --branch v0.2510.0 https://github.com/mautrix/whatsapp.git . \
|
||||||
&& go build -o /app/pkg/mautrix-whatsapp ./cmd/mautrix-whatsapp
|
&& go build -o /app/pkg/mautrix-whatsapp ./cmd/mautrix-whatsapp
|
||||||
|
|
||||||
# Copy startup script
|
# Copy startup script
|
||||||
|
|||||||
4
start.sh
4
start.sh
@@ -105,7 +105,7 @@ if [ ! -f "$CONFIG_PATH" ]; then
|
|||||||
echo "=> Fixing registration file regex patterns for domain: $BASE_DOMAIN"
|
echo "=> Fixing registration file regex patterns for domain: $BASE_DOMAIN"
|
||||||
# Fix user regex patterns to use base domain instead of matrix subdomain
|
# Fix user regex patterns to use base domain instead of matrix subdomain
|
||||||
yq -i -y '.namespaces.users[0].regex = "^@whatsappbot:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsappbot regex"
|
yq -i -y '.namespaces.users[0].regex = "^@whatsappbot:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsappbot regex"
|
||||||
yq -i -y '.namespaces.users[1].regex = "^@whatsapp_.*:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsapp_.* regex"
|
yq -i -y '.namespaces.users[1].regex = "^@whatsapp_.+:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsapp_.+ regex"
|
||||||
yq -i -y '.sender_localpart = "whatsappbot"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix sender_localpart"
|
yq -i -y '.sender_localpart = "whatsappbot"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix sender_localpart"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ else
|
|||||||
yq -i -y '.url = "https://'"$CLOUDRON_APP_DOMAIN"'"' "$REGISTRATION_PATH" 2>/dev/null || true
|
yq -i -y '.url = "https://'"$CLOUDRON_APP_DOMAIN"'"' "$REGISTRATION_PATH" 2>/dev/null || true
|
||||||
# Fix user regex patterns to use base domain instead of matrix subdomain
|
# Fix user regex patterns to use base domain instead of matrix subdomain
|
||||||
yq -i -y '.namespaces.users[0].regex = "^@whatsappbot:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsappbot regex"
|
yq -i -y '.namespaces.users[0].regex = "^@whatsappbot:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsappbot regex"
|
||||||
yq -i -y '.namespaces.users[1].regex = "^@whatsapp_.*:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsapp_.* regex"
|
yq -i -y '.namespaces.users[1].regex = "^@whatsapp_.+:'"$BASE_DOMAIN"'$"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix whatsapp_.+ regex"
|
||||||
yq -i -y '.sender_localpart = "whatsappbot"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix sender_localpart"
|
yq -i -y '.sender_localpart = "whatsappbot"' "$REGISTRATION_PATH" || echo "=> ERROR: Could not fix sender_localpart"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user