Fixes broadcasting

This commit is contained in:
Mouse Reeve 2020-09-29 21:08:04 -07:00
parent acba5cfc75
commit 8260dcf804
2 changed files with 2 additions and 3 deletions

View file

@ -57,7 +57,7 @@ def broadcast_task(sender_id, activity, recipients):
except requests.exceptions.HTTPError as e:
# TODO: maybe keep track of users who cause errors
errors.append({
'error': e,
'error': str(e),
'recipient': recipient,
'activity': activity,
})

View file

@ -44,8 +44,7 @@ def make_signature(sender, destination, date, digest):
def make_digest(data):
''' creates a message digest for signing '''
return 'SHA-256=' + b64encode(hashlib.sha256(data.encode('utf-8'))\
.digest()).decode('utf-8')
return 'SHA-256=' + b64encode(hashlib.sha256(data).digest()).decode('utf-8')
def verify_digest(request):