summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/activitypub.c b/activitypub.c
index e389915..d8f748e 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1955,9 +1955,12 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1955 if (xs_type(object) == XSTYPE_DICT) 1955 if (xs_type(object) == XSTYPE_DICT)
1956 object = xs_dict_get(object, "id"); 1956 object = xs_dict_get(object, "id");
1957 1957
1958 timeline_admire(snac, object, actor, 1); 1958 if (timeline_admire(snac, object, actor, 1) == 201) {
1959 snac_log(snac, xs_fmt("new 'Like' %s %s", actor, object)); 1959 snac_log(snac, xs_fmt("new 'Like' %s %s", actor, object));
1960 do_notify = 1; 1960 do_notify = 1;
1961 }
1962 else
1963 snac_log(snac, xs_fmt("repeated 'Like' from %s to %s", actor, object));
1961 } 1964 }
1962 else 1965 else
1963 if (strcmp(type, "Announce") == 0) { /** **/ 1966 if (strcmp(type, "Announce") == 0) { /** **/
@@ -1983,9 +1986,13 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1983 xs *who_o = NULL; 1986 xs *who_o = NULL;
1984 1987
1985 if (valid_status(actor_request(snac, who, &who_o))) { 1988 if (valid_status(actor_request(snac, who, &who_o))) {
1986 timeline_admire(snac, object, actor, 0); 1989 if (timeline_admire(snac, object, actor, 0) == 201) {
1987 snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object)); 1990 snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
1988 do_notify = 1; 1991 do_notify = 1;
1992 }
1993 else
1994 snac_log(snac, xs_fmt("repeated 'Announce' from %s to %s",
1995 actor, object));
1989 } 1996 }
1990 else 1997 else
1991 snac_debug(snac, 1, xs_fmt("dropped 'Announce' on actor request error %s", who)); 1998 snac_debug(snac, 1, xs_fmt("dropped 'Announce' on actor request error %s", who));