From 67ba0e15738d0ecc2c701dc2d7734784d025f1cf Mon Sep 17 00:00:00 2001 From: nicoco Date: Sat, 3 Aug 2024 21:56:09 +0200 Subject: [PATCH] fix: channels without parent References: https://todo.sr.ht/~nicoco/sleamdge/10 --- sleamdge/group.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sleamdge/group.py b/sleamdge/group.py index 32d52aa..2741acb 100644 --- a/sleamdge/group.py +++ b/sleamdge/group.py @@ -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() -- 2.45.2