mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Update if account is a bot or not when refreshing user profiles #334
This commit is contained in:
parent
f4ad10e4c4
commit
4cfcc69648
1 changed files with 2 additions and 0 deletions
|
@ -491,6 +491,8 @@ def refresh_user_profile_task(user_id):
|
||||||
user.about_html = markdown_to_html(user.about) # prefer Markdown if provided, overwrite version obtained from HTML
|
user.about_html = markdown_to_html(user.about) # prefer Markdown if provided, overwrite version obtained from HTML
|
||||||
else:
|
else:
|
||||||
user.about = html_to_text(user.about_html)
|
user.about = html_to_text(user.about_html)
|
||||||
|
if 'type' in activity_json:
|
||||||
|
user.bot = True if activity_json['type'] == 'Service' else False
|
||||||
user.ap_fetched_at = utcnow()
|
user.ap_fetched_at = utcnow()
|
||||||
user.public_key = activity_json['publicKey']['publicKeyPem']
|
user.public_key = activity_json['publicKey']['publicKeyPem']
|
||||||
user.indexable = new_indexable
|
user.indexable = new_indexable
|
||||||
|
|
Loading…
Add table
Reference in a new issue