~nicoco/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH v2] Signal: fix missing profile.name handling

Details
Message ID
<20220731150020.222547-1-rexroni@splintermail.com>
DKIM signature
pass
Download raw message
Patch: +3 -3
Bug introduced in 29df2273: if profile.name is None, an exception would
be raised before falling back to profile.profile_name.
---
 slidge/plugins/signal/session.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/slidge/plugins/signal/session.py b/slidge/plugins/signal/session.py
index deec944..dd551ed 100644
--- a/slidge/plugins/signal/session.py
+++ b/slidge/plugins/signal/session.py
@@ -150,9 +150,9 @@ class Session(BaseSession["Contact", "Roster", "Gateway"]):
            )
            contact = self.contacts.by_phone(profile.address.number)
            contact.uuid = profile.address.uuid
            contact.name = profile.name.replace(
                "\u0000", " "
            ) or profile.profile_name.replace("\u0000", " ")
            contact.name = profile.name or profile.profile_name
            if contact.name is not None:
                contact.name = contact.name.replace("\u0000", "")
            if full_profile.avatar is not None:
                with open(full_profile.avatar, "rb") as f:
                    contact.avatar = f.read()
--
2.37.1
Reply to thread Export thread (mbox)