瀏覽代碼

Fall back to profile name even when preferring contact list names

Tulir Asokan 4 年之前
父節點
當前提交
4f3c449882
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      mautrix_signal/puppet.py

+ 3 - 0
mautrix_signal/puppet.py

@@ -168,6 +168,9 @@ class Puppet(DBPuppet, BasePuppet):
             name = info.profile_name
         elif isinstance(info, (Contact, Profile)) and contact_names != "disallow":
             name = info.name
+            if not name and isinstance(info, Profile) and info.profile_name:
+                # Contact list name is preferred, but was not found, fall back to profile
+                name = info.profile_name
         else:
             name = None