Fixes signing Create activities
and some tests for the base_model
This commit is contained in:
@ -96,7 +96,7 @@ class ActivitypubMixin:
|
||||
''' returns the object wrapped in a Create activity '''
|
||||
activity_object = self.to_activity()
|
||||
|
||||
signer = pkcs1_15.new(RSA.import_key(user.private_key))
|
||||
signer = pkcs1_15.new(RSA.import_key(user.key_pair.private_key))
|
||||
content = activity_object['content']
|
||||
signed_message = signer.sign(SHA256.new(content.encode('utf8')))
|
||||
create_id = self.remote_id + '/activity'
|
||||
|
@ -44,11 +44,6 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
||||
)
|
||||
objects = InheritanceManager()
|
||||
|
||||
@property
|
||||
def ap_replies(self):
|
||||
''' structured replies block '''
|
||||
return self.to_replies()
|
||||
|
||||
activity_serializer = activitypub.Note
|
||||
serialize_reverse_fields = ['attachments']
|
||||
|
||||
|
Reference in New Issue
Block a user