From d63ae4768a840a79c903c3022c65454c3896bd7d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 14 Dec 2023 12:43:52 +0000 Subject: [PATCH 1/2] infra: Fix string to use correct translation function name --- snikket_web/infra.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snikket_web/infra.py b/snikket_web/infra.py index 4d6469c..ddfb914 100644 --- a/snikket_web/infra.py +++ b/snikket_web/infra.py @@ -53,7 +53,7 @@ def flatten(a: typing.Iterable, levels: int = 1) -> typing.Iterable: def circle_name(c: typing.Any) -> str: if c.id_ == "default" and c.name == "default": - return _("Main") + return _l("Main") return c.name From 7411f4a9e181f9938c9559a3926c08114db29cfb Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 14 Dec 2023 12:43:59 +0000 Subject: [PATCH 2/2] prosodyclient: Use empty name if none provided by the server In parallel, I have updated the server to use the group name for groups with no name (the MUCs with no name are typically the default auto-created group MUC). --- snikket_web/prosodyclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snikket_web/prosodyclient.py b/snikket_web/prosodyclient.py index f070279..70c40d5 100644 --- a/snikket_web/prosodyclient.py +++ b/snikket_web/prosodyclient.py @@ -190,7 +190,7 @@ class AdminGroupChatInfo: return cls( id_=data["id"], jid=data["jid"], - name=data["name"], + name=data.get("name", ""), )