fix: agregar E2EE a DM rooms creados por notify-developer.sh
El createRoom usaba solo preset trusted_private_chat, que configura permisos pero no activa encriptacion. Ahora incluye initial_state con m.room.encryption (m.megolm.v1.aes-sha2) para que las salas DM de bienvenida se creen cifradas de extremo a extremo. Esto corrige que bots recientes (father-bot, test-bot, test-personality) aparezcan sin E2EE en Element cuando el DM fue iniciado por el script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -105,14 +105,23 @@ send_dm() {
|
||||
local backoff=2
|
||||
|
||||
while [[ $retry -lt $max_retries ]]; do
|
||||
# Crear DM room (o reutilizar existente)
|
||||
# Crear DM room con E2EE habilitado (o reutilizar existente)
|
||||
ROOM_RESP=$(curl -sf -X POST "${MATRIX_HOMESERVER}/_matrix/client/v3/createRoom" \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{
|
||||
\"is_direct\": true,
|
||||
\"invite\": [\"${user_id}\"],
|
||||
\"preset\": \"trusted_private_chat\"
|
||||
\"preset\": \"trusted_private_chat\",
|
||||
\"initial_state\": [
|
||||
{
|
||||
\"type\": \"m.room.encryption\",
|
||||
\"state_key\": \"\",
|
||||
\"content\": {
|
||||
\"algorithm\": \"m.megolm.v1.aes-sha2\"
|
||||
}
|
||||
}
|
||||
]
|
||||
}" 2>&1) || {
|
||||
retry=$((retry + 1))
|
||||
if [[ $retry -lt $max_retries ]]; then
|
||||
|
||||
Reference in New Issue
Block a user