summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2024-02-05 11:50:59 +0100
committerGravatar default2024-02-05 11:50:59 +0100
commit199d71dc3a64ec9782b658b342f4695790495dcf (patch)
tree7df533e4b3d07f6883be5f74b80f16fde457e210
parentnotify_list() no longer has a new_only argument. (diff)
downloadsnac2-199d71dc3a64ec9782b658b342f4695790495dcf.tar.gz
snac2-199d71dc3a64ec9782b658b342f4695790495dcf.tar.xz
snac2-199d71dc3a64ec9782b658b342f4695790495dcf.zip
Skip our own notifications.
-rw-r--r--activitypub.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index 698758c..df4877b 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -823,6 +823,10 @@ xs_str *process_tags(snac *snac, const char *content, xs_list **tag)
823void notify(snac *snac, const char *type, const char *utype, const char *actor, const xs_dict *msg) 823void notify(snac *snac, const char *type, const char *utype, const char *actor, const xs_dict *msg)
824/* notifies the user of relevant events */ 824/* notifies the user of relevant events */
825{ 825{
826 /* skip our own notifications */
827 if (strcmp(snac->actor, actor) == 0)
828 return;
829
826 const char *id = xs_dict_get(msg, "id"); 830 const char *id = xs_dict_get(msg, "id");
827 831
828 if (strcmp(type, "Create") == 0) { 832 if (strcmp(type, "Create") == 0) {