ma1uta / ma1sd

Federated Matrix Identity Server (formerly fork of kamax/mxisd)
GNU Affero General Public License v3.0
167 stars 56 forks source link

Fix room name retrieval after Synapse dropped table room_names #13

Closed NullIsNot0 closed 4 years ago

NullIsNot0 commented 4 years ago

Recently Synapse dropped unused (by Synapse itself) table "room_names" which brakes room name retrieval for ma1sd. There is a table "room_stats_state" from which we can retrieve room name by it's ID. Note that people to people conversations do not contain room names, because they are generated on-the-fly by setting other participants names separated by word "and". That's why this query will only get names for rooms where room names are set during creation process (or changed later) and are the same for all participants. Link to Synapse code where it drops "room_names" table: https://github.com/matrix-org/synapse/blob/master/synapse/storage/data_stores/main/schema/delta/56/drop_unused_event_tables.sql#L17

ma1uta commented 4 years ago

Thanks for the PR and patience. I will check this PR and will add the configuration to switch between old "room_names" table for people who haven't upgraded yet and a new "room_stats_state" table.