mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
formatting fixes
This commit is contained in:
parent
632e3844b9
commit
49758f2383
2 changed files with 4 additions and 2 deletions
|
@ -4,7 +4,7 @@ import sys
|
||||||
|
|
||||||
from .base_activity import ActivityEncoder, Signature, naive_parse
|
from .base_activity import ActivityEncoder, Signature, naive_parse
|
||||||
from .base_activity import Link, Mention, Hashtag
|
from .base_activity import Link, Mention, Hashtag
|
||||||
from .base_activity import ActivitySerializerError, resolve_remote_id, get_activitypub_data
|
from .base_activity import ActivitySerializerError, resolve_remote_id
|
||||||
from .image import Document, Image
|
from .image import Document, Image
|
||||||
from .note import Note, GeneratedNote, Article, Comment, Quotation
|
from .note import Note, GeneratedNote, Article, Comment, Quotation
|
||||||
from .note import Review, Rating
|
from .note import Review, Rating
|
||||||
|
|
|
@ -130,7 +130,9 @@ def has_valid_signature(request, activity):
|
||||||
"""verify incoming signature"""
|
"""verify incoming signature"""
|
||||||
try:
|
try:
|
||||||
signature = Signature.parse(request)
|
signature = Signature.parse(request)
|
||||||
remote_user = activitypub.resolve_remote_id(activity.get("actor"), model=models.User)
|
remote_user = activitypub.resolve_remote_id(
|
||||||
|
activity.get("actor"), model=models.User
|
||||||
|
)
|
||||||
if not remote_user:
|
if not remote_user:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue