Beispiel #1
0
 def reject(self):
     ''' generate a Reject for this follow request '''
     user = self.user_object
     activity = activitypub.Reject(id=self.get_remote_id(status='rejects'),
                                   actor=self.user_object.remote_id,
                                   object=self.to_activity()).serialize()
     self.delete()
     self.broadcast(activity, user)
Beispiel #2
0
    def reject(self):
        """generate a Reject for this follow request"""
        if self.user_object.local:
            activity = activitypub.Reject(
                id=self.get_accept_reject_id(status="rejects"),
                actor=self.user_object.remote_id,
                object=self.to_activity(),
            ).serialize()
            self.broadcast(activity, self.user_object)

        self.delete()
Beispiel #3
0
 def to_reject_activity(self):
     ''' generate an Accept for this follow request '''
     return activitypub.Reject(id=self.get_remote_id(status='rejects'),
                               actor=self.user_object.remote_id,
                               object=self.to_activity()).serialize()