Spaces:
Running
Running
move outside for loop
Browse files
update.py
CHANGED
@@ -217,16 +217,16 @@ def update_webhooks():
|
|
217 |
else:
|
218 |
to_add.append({"name": m.id, "type": "org"})
|
219 |
|
220 |
-
|
221 |
|
222 |
-
|
223 |
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
|
232 |
|
|
|
217 |
else:
|
218 |
to_add.append({"name": m.id, "type": "org"})
|
219 |
|
220 |
+
new_watched = webhook2update[0].watched + to_add
|
221 |
|
222 |
+
print("There are now", len(new_watched), "items in the watched list")
|
223 |
|
224 |
+
api.update_webhook(
|
225 |
+
webhook_id=id2update,
|
226 |
+
url=webhook_url,
|
227 |
+
watched=new_watched,
|
228 |
+
domains=["discussion"],
|
229 |
+
secret=WEBHOOK_SECRET,
|
230 |
+
)
|
231 |
|
232 |
|