From 5b02a225191268f75d9ea0b06640503c9607e410 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 11 May 2022 17:16:34 +0100 Subject: [PATCH] Prepare for alternative property value --- briar.py | 4 ++-- cwtch.py | 4 ++-- donate.py | 6 +++--- enigma.py | 4 ++-- matrix.py | 4 ++-- pgp.py | 12 ++++++------ ssb.py | 4 ++-- tox.py | 4 ++-- utils.py | 4 ++-- webapp_utils.py | 2 +- webfinger.py | 2 +- xmpp.py | 4 ++-- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/briar.py b/briar.py index 01a64e2f5..66ef59080 100644 --- a/briar.py +++ b/briar.py @@ -27,7 +27,7 @@ def get_briar_address(actor_json: {}) -> str: continue if not property_value.get('value'): continue - if property_value['type'] != 'PropertyValue': + if not property_value['type'].endswith('PropertyValue'): continue property_value['value'] = property_value['value'].strip() if len(property_value['value']) < 50: @@ -106,7 +106,7 @@ def set_briar_address(actor_json: {}, briar_address: str) -> None: continue if not name_value.lower().startswith('briar'): continue - if property_value['type'] != 'PropertyValue': + if not property_value['type'].endswith('PropertyValue'): continue property_value['value'] = briar_address return diff --git a/cwtch.py b/cwtch.py index 85eef02c8..a52b2c492 100644 --- a/cwtch.py +++ b/cwtch.py @@ -29,7 +29,7 @@ def get_cwtch_address(actor_json: {}) -> str: continue if not property_value.get('value'): continue - if property_value['type'] != 'PropertyValue': + if not property_value['type'].endswith('PropertyValue'): continue property_value['value'] = property_value['value'].strip() if len(property_value['value']) < 2: @@ -94,7 +94,7 @@ def set_cwtch_address(actor_json: {}, cwtch_address: str) -> None: continue if not name_value.lower().startswith('cwtch'): continue - if property_value['type'] != 'PropertyValue': + if not property_value['type'].endswith('PropertyValue'): continue property_value['value'] = cwtch_address return diff --git a/donate.py b/donate.py index c013b7ea4..987b01ab8 100644 --- a/donate.py +++ b/donate.py @@ -38,7 +38,7 @@ def get_donation_url(actor_json: {}) -> str: continue if not property_value.get('value'): continue - if property_value['type'] != 'PropertyValue': + if not property_value['type'].endswith('PropertyValue'): continue if '