~nicoco/sleamdge

67ba0e15738d0ecc2c701dc2d7734784d025f1cf — nicoco a month ago f9d657f
fix: channels without parent

References: https://todo.sr.ht/~nicoco/sleamdge/10
1 files changed, 5 insertions(+), 0 deletions(-)

M sleamdge/group.py
M sleamdge/group.py => sleamdge/group.py +5 -0
@@ 122,6 122,11 @@ class MUC(LegacyMUC[ChannelId, int, Participant, int]):
        channel = await self.get_steam_channel()
        self.log.debug("Channel: %s", channel)
        parent: Union[Group, Clan] = channel.group  # type:ignore
        if parent is None:
            self.name = channel.name
            self.type = MucType.GROUP
            return

        self.name = f"{parent.name}/{channel.name or 'Home'}"
        self.description = parent.tagline
        sha = parent.avatar.sha.hex()