diff options
| author | 2024-02-05 11:50:59 +0100 | |
|---|---|---|
| committer | 2024-02-05 11:50:59 +0100 | |
| commit | 199d71dc3a64ec9782b658b342f4695790495dcf (patch) | |
| tree | 7df533e4b3d07f6883be5f74b80f16fde457e210 | |
| parent | notify_list() no longer has a new_only argument. (diff) | |
| download | snac2-199d71dc3a64ec9782b658b342f4695790495dcf.tar.gz snac2-199d71dc3a64ec9782b658b342f4695790495dcf.tar.xz snac2-199d71dc3a64ec9782b658b342f4695790495dcf.zip | |
Skip our own notifications.
| -rw-r--r-- | activitypub.c | 4 |
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) | |||
| 823 | void notify(snac *snac, const char *type, const char *utype, const char *actor, const xs_dict *msg) | 823 | void 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) { |