|
@@ -84,7 +84,9 @@ AUTH="Authorization: Bearer $TOKEN"
|
|
|
###################################################################################################
|
|
|
# finally start pruning the room:
|
|
|
###################################################################################################
|
|
|
-POSTDATA='{"delete_local_events":"true"}' # this will really delete local events, so the messages in the room really disappear unless they are restored by remote federation
|
|
|
+# this will really delete local events, so the messages in the room really
|
|
|
+# disappear unless they are restored by remote federation. This is because
|
|
|
+# we pass {"delete_local_events":true} to the curl invocation below.
|
|
|
|
|
|
for ROOM in "${ROOMS_ARRAY[@]}"; do
|
|
|
echo "########################################### $(date) ################# "
|
|
@@ -104,7 +106,7 @@ for ROOM in "${ROOMS_ARRAY[@]}"; do
|
|
|
SLEEP=2
|
|
|
set -x
|
|
|
# call purge
|
|
|
- OUT=$(curl --header "$AUTH" -s -d $POSTDATA POST "$API_URL/admin/purge_history/$ROOM/$EVENT_ID")
|
|
|
+ OUT=$(curl --header "$AUTH" -s -d '{"delete_local_events":true}' POST "$API_URL/admin/purge_history/$ROOM/$EVENT_ID")
|
|
|
PURGE_ID=$(echo "$OUT" |grep purge_id|cut -d'"' -f4 )
|
|
|
if [ "$PURGE_ID" == "" ]; then
|
|
|
# probably the history purge is already in progress for $ROOM
|