diff options
Diffstat (limited to 'users')
-rw-r--r-- | users/migrations/0001_initial.py | 10 | ||||
-rw-r--r-- | users/views/identity.py | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/users/migrations/0001_initial.py b/users/migrations/0001_initial.py index c4f4774..a51ef00 100644 --- a/users/migrations/0001_initial.py +++ b/users/migrations/0001_initial.py @@ -92,7 +92,7 @@ class Migration(migrations.Migration): verbose_name="ID", ), ), - ("state_ready", models.BooleanField(default=False)), + ("state_ready", models.BooleanField(default=True)), ("state_changed", models.DateTimeField(auto_now_add=True)), ("state_attempted", models.DateTimeField(blank=True, null=True)), ("state_locked_until", models.DateTimeField(blank=True, null=True)), @@ -158,7 +158,7 @@ class Migration(migrations.Migration): verbose_name="ID", ), ), - ("state_ready", models.BooleanField(default=False)), + ("state_ready", models.BooleanField(default=True)), ("state_changed", models.DateTimeField(auto_now_add=True)), ("state_attempted", models.DateTimeField(blank=True, null=True)), ("state_locked_until", models.DateTimeField(blank=True, null=True)), @@ -230,7 +230,9 @@ class Migration(migrations.Migration): ( "users", models.ManyToManyField( - related_name="identities", to=settings.AUTH_USER_MODEL + blank=True, + related_name="identities", + to=settings.AUTH_USER_MODEL, ), ), ], @@ -286,7 +288,7 @@ class Migration(migrations.Migration): verbose_name="ID", ), ), - ("state_ready", models.BooleanField(default=False)), + ("state_ready", models.BooleanField(default=True)), ("state_changed", models.DateTimeField(auto_now_add=True)), ("state_attempted", models.DateTimeField(blank=True, null=True)), ("state_locked_until", models.DateTimeField(blank=True, null=True)), diff --git a/users/views/identity.py b/users/views/identity.py index 6205145..3bcf5c5 100644 --- a/users/views/identity.py +++ b/users/views/identity.py @@ -36,12 +36,12 @@ class ViewIdentity(TemplateView): local=False, fetch=True, ) - statuses = identity.statuses.all()[:100] + posts = identity.posts.all()[:100] if identity.data_age > settings.IDENTITY_MAX_AGE: identity.transition_perform(IdentityStates.outdated) return { "identity": identity, - "statuses": statuses, + "posts": posts, "follow": Follow.maybe_get(self.request.identity, identity) if self.request.identity else None, @@ -232,9 +232,11 @@ class Inbox(View): if not identity.verify_signature( signature_details["signature"], headers_string ): + print("Bad signature!") + print(document) return HttpResponseUnauthorized("Bad signature") # Hand off the item to be processed by the queue - InboxMessage.objects.create(message=document, state_ready=True) + InboxMessage.objects.create(message=document) return HttpResponse(status=202) |