From 5352ba938a1f14652b6a362e97afebf1448b6442 Mon Sep 17 00:00:00 2001
From: Matthieu Fesselier <matthieu.fesselier@gmail.com>
Date: Wed, 6 Mar 2019 17:13:05 +0700
Subject: [PATCH] bugfix: improve subscription system

---
 djangoldp_notification/models.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/djangoldp_notification/models.py b/djangoldp_notification/models.py
index 78fe21c..7d50db5 100644
--- a/djangoldp_notification/models.py
+++ b/djangoldp_notification/models.py
@@ -51,11 +51,11 @@ def send_notification(sender, instance, **kwargs):
             process = Thread(target=send_request, args=[subscription.inbox, url])
             process.start()
             threads.append(process)
-def send_request(target, object):
+def send_request(target, objectIri):
     try:
         req=requests.post(target,
             json={"@context":"https://cdn.happy-dev.fr/owl/hdcontext.jsonld",
-                "object": object, "type": "system", "read": False},
+                "object": objectIri, "type": "update"},
             headers={"Content-Type": "application/ld+json"})
     except:
         logging.error('Djangoldp_notifications: Error with request')
-- 
GitLab