def format_urn(urn, org): if org and org.is_anon: return ContactURN.ANON_MASK_HTML if isinstance(urn, ContactURN): return urn.get_display(org=org, international=True) else: return URN.format(urn, international=True)
def get_recipient(self, obj): org = self.derive_org() return ContactURN.ANON_MASK_HTML if org.is_anon else URN.format( obj.recipient, international=True)
def get_sender(self, obj): return URN.format(obj.sender, international=True) if obj.sender else "--"