commit 21400ca
default
·
2024-03-22 20:26:10 +0000 UTC
parent 38110ae
Don't be overzealous in avoid notifications for Likes and Announces.
1 files changed,
+6,
-6
+6,
-6
1@@ -1996,12 +1996,12 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
2 if (xs_type(object) == XSTYPE_DICT)
3 object = xs_dict_get(object, "id");
4
5- if (timeline_admire(snac, object, actor, 1) == 201) {
6+ if (timeline_admire(snac, object, actor, 1) == 201)
7 snac_log(snac, xs_fmt("new 'Like' %s %s", actor, object));
8- do_notify = 1;
9- }
10 else
11 snac_log(snac, xs_fmt("repeated 'Like' from %s to %s", actor, object));
12+
13+ do_notify = 1;
14 }
15 else
16 if (strcmp(type, "Announce") == 0) { /** **/
17@@ -2027,13 +2027,13 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
18 xs *who_o = NULL;
19
20 if (valid_status(actor_request(snac, who, &who_o))) {
21- if (timeline_admire(snac, object, actor, 0) == 201) {
22+ if (timeline_admire(snac, object, actor, 0) == 201)
23 snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
24- do_notify = 1;
25- }
26 else
27 snac_log(snac, xs_fmt("repeated 'Announce' from %s to %s",
28 actor, object));
29+
30+ do_notify = 1;
31 }
32 else
33 snac_debug(snac, 1, xs_fmt("dropped 'Announce' on actor request error %s", who));