summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c4
-rw-r--r--data.c3
-rw-r--r--snac.h2
3 files changed, 6 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c
index 9a16521..36624a1 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -949,7 +949,7 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor,
949 if (strcmp(utype, "Follow") == 0) 949 if (strcmp(utype, "Follow") == 0)
950 objid = actor; 950 objid = actor;
951 951
952 notify_add(snac, type, utype, actor, objid != NULL ? objid : id); 952 notify_add(snac, type, utype, actor, objid != NULL ? objid : id, msg);
953} 953}
954 954
955/** messages **/ 955/** messages **/
@@ -2180,6 +2180,8 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
2180 2180
2181 snac_log(snac, xs_fmt("'Move': unfollowing %s", old_account)); 2181 snac_log(snac, xs_fmt("'Move': unfollowing %s", old_account));
2182 } 2182 }
2183
2184 do_notify = 1;
2183 } 2185 }
2184 else 2186 else
2185 snac_log(snac, xs_fmt("'Move' error: old actor %s not found in %s 'alsoKnownAs'", 2187 snac_log(snac, xs_fmt("'Move' error: old actor %s not found in %s 'alsoKnownAs'",
diff --git a/data.c b/data.c
index 121407f..1a4551d 100644
--- a/data.c
+++ b/data.c
@@ -2517,7 +2517,7 @@ xs_str *notify_check_time(snac *snac, int reset)
2517 2517
2518 2518
2519void notify_add(snac *snac, const char *type, const char *utype, 2519void notify_add(snac *snac, const char *type, const char *utype,
2520 const char *actor, const char *objid) 2520 const char *actor, const char *objid, const xs_dict *msg)
2521/* adds a new notification */ 2521/* adds a new notification */
2522{ 2522{
2523 xs *ntid = tid(0); 2523 xs *ntid = tid(0);
@@ -2537,6 +2537,7 @@ void notify_add(snac *snac, const char *type, const char *utype,
2537 noti = xs_dict_append(noti, "utype", utype); 2537 noti = xs_dict_append(noti, "utype", utype);
2538 noti = xs_dict_append(noti, "actor", actor); 2538 noti = xs_dict_append(noti, "actor", actor);
2539 noti = xs_dict_append(noti, "date", date); 2539 noti = xs_dict_append(noti, "date", date);
2540 noti = xs_dict_append(noti, "msg", msg);
2540 2541
2541 if (!xs_is_null(objid)) 2542 if (!xs_is_null(objid))
2542 noti = xs_dict_append(noti, "objid", objid); 2543 noti = xs_dict_append(noti, "objid", objid);
diff --git a/snac.h b/snac.h
index 280dc15..0ebaa62 100644
--- a/snac.h
+++ b/snac.h
@@ -207,7 +207,7 @@ void lastlog_write(snac *snac, const char *source);
207 207
208xs_str *notify_check_time(snac *snac, int reset); 208xs_str *notify_check_time(snac *snac, int reset);
209void notify_add(snac *snac, const char *type, const char *utype, 209void notify_add(snac *snac, const char *type, const char *utype,
210 const char *actor, const char *objid); 210 const char *actor, const char *objid, const xs_dict *msg);
211xs_dict *notify_get(snac *snac, const char *id); 211xs_dict *notify_get(snac *snac, const char *id);
212int notify_new_num(snac *snac); 212int notify_new_num(snac *snac);
213xs_list *notify_list(snac *snac, int skip, int show); 213xs_list *notify_list(snac *snac, int skip, int show);