opentower / populus-viewer

A Social Annotation Tool Powered by Matrix
https://opentower.github.io/populus-viewer
GNU Affero General Public License v3.0
120 stars 7 forks source link

RoomIcon in spacesManager can't handle rooms with no name #122

Closed gleachkr closed 2 years ago

gleachkr commented 2 years ago

As discussed on matrix, 2022-02-28

DanilaFe commented 2 years ago

My quick summary of the issue:

Populus tries to load and display all the collections (spaces) that a user is part of when it opens. This also includes rendering rooms that are visible in a space, but not yet joined (so that users may discover and join relevant discussions). If a room doesn't have a name, Populus will crash while trying to calculate its color. This crash make all the buttons in the UI inert.

To replicate: join the Matrix Community space. The room #matrix-architecture:matrix.org doesn't have a name set, so Populus' main page should crash midway through loading collections.

gleachkr commented 2 years ago

I think 9fff3e6df5237777f62c61eed670a6b145b946f4 should help - it uses an alias as a fallback, and then just "?" (it was also an option to use the roomId, but I feel like maybe it'd make sense to signal to the user that there's something odd about a room with no name or alias).