Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

m.room.retention doesn't work on all rooms #8611

@elixx

Description

@elixx

Description

I set the m.room.retention state event on a number of rooms.
The retention policy appears to work on traditionally created rooms (i.e. via Element "Add new room"), but rooms created by a direct message accept the state event but old messages do not get purged.
From what I can tell, direct-message rooms have a room ID and properties just like the other rooms, and it accepted the state event, so I expected this to work.

Steps to reproduce

  • Configure synapse with retention policy (retention: enabled: true, defaults, and purge jobs). My settings are included at the bottom of thispost.
  • Send message from user A to user B to start a direct message.
  • In Element's Room Settings / Devtools, send a state event type m.room.retention to set max_lifetime on the room.

I've done this on other standard rooms, and the results stick and appear the same when viewing the room state after sending. I checked that both the working rooms and the non-working rooms show up as room version 6.

Version information

  • Homeserver:
    locally hosted docker container

  • Version:
    current master
    server_version: "1.21.2"
    python_version: "3.7.9"

  • Install method:
    matrixdotorg/synapse image via docker-compose build

  • Platform:
    Docker on Ubuntu

retention:
  enabled: true
  default_policy:
    min_lifetime: 7d
    max_lifetime: 30d
  allowed_lifetime_min: 1h
  allowed_lifetime_max: 10y
  purge_jobs:
    - longest_max_lifetime: 2d
      interval: 1h
    - shortest_max_lifetime: 2d
      interval: 12h

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions