Subscribe some container to user's inbox
I'm not able to subscribe a container like /users/
to an /users/xyz/inbox/
I'm getting a 400.
{"@context":"https://cdn.happy-dev.fr/owl/hdcontext.jsonld","summary":["This field is required."]}
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Calum Mackervoy mentioned in merge request djangoldp!220 (closed)
mentioned in merge request djangoldp!220 (closed)
- Maintainer
It thinks you're trying to POST aNotification
I guess, which makes sensedjangoldp!220 (closed) will close this because you would be able to POST aFollow
activity to this resource, or aCreate
activity when you want to create anActivity
thereEdited by Calum Mackervoy - Calum Mackervoy mentioned in merge request !44 (closed)
mentioned in merge request !44 (closed)
- Maintainer
@jbpasquier what is the request you sent to get this 400 error? Unable to replicate this in a unit test
def test_can_subscribe_to_container(self): self.setUpLoggedInUser() users_container = "{}/users/".format(settings.BASE_URL) Subscription.objects.create(object=users_container, inbox=self.user.urlid + "inbox/") self.assertEqual(self.user.inbox.count(), 0) self._get_random_user() self.assertEqual(self.user.inbox.count(), 2) notification = self.user.inbox.all()[0] self.assertTrue(notification.object, users_container)
Edited by Calum Mackervoy Collapse replies - Author Owner
From what I did:
- ServerA have a subscription from
/users/
tohttp://serverB/users/inbox/
- ServerA's user list gets some change, like a new user for instance
- ServerB denied the notification because
{"@context":"https://cdn.happy-dev.fr/owl/hdcontext.jsonld","summary":["This field is required."]}
.
- ServerA have a subscription from
- Maintainer
I think this is a simple issue with the model definition but I couldn't replicate to be sure: !46 (merged)
- Calum Mackervoy mentioned in merge request !46 (merged)
mentioned in merge request !46 (merged)
- Jean-Baptiste Pasquier closed via merge request !46 (merged)
closed via merge request !46 (merged)
- Jean-Baptiste Pasquier mentioned in commit 859df928
mentioned in commit 859df928