summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c5
-rw-r--r--data.c9
-rw-r--r--snac.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index bf9ce67..98baf8b 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1147,9 +1147,12 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1147 else 1147 else
1148 snac_debug(snac, 1, xs_fmt("process_message type '%s' ignored", type)); 1148 snac_debug(snac, 1, xs_fmt("process_message type '%s' ignored", type));
1149 1149
1150 if (do_notify) 1150 if (do_notify) {
1151 notify(snac, type, utype, actor, msg); 1151 notify(snac, type, utype, actor, msg);
1152 1152
1153 timeline_touch(snac);
1154 }
1155
1153 return 1; 1156 return 1;
1154} 1157}
1155 1158
diff --git a/data.c b/data.c
index 7071097..9f2e462 100644
--- a/data.c
+++ b/data.c
@@ -14,6 +14,7 @@
14#include <time.h> 14#include <time.h>
15#include <sys/stat.h> 15#include <sys/stat.h>
16#include <sys/file.h> 16#include <sys/file.h>
17#include <sys/time.h>
17#include <fcntl.h> 18#include <fcntl.h>
18#include <pthread.h> 19#include <pthread.h>
19 20
@@ -870,6 +871,14 @@ double timeline_mtime(snac *snac)
870} 871}
871 872
872 873
874int timeline_touch(snac *snac)
875/* changes the date of the timeline index */
876{
877 xs *fn = xs_fmt("%s/private.idx", snac->basedir);
878 return utimes(fn, NULL);
879}
880
881
873xs_str *timeline_fn_by_md5(snac *snac, const char *md5) 882xs_str *timeline_fn_by_md5(snac *snac, const char *md5)
874/* get the filename of an entry by md5 from any timeline */ 883/* get the filename of an entry by md5 from any timeline */
875{ 884{
diff --git a/snac.h b/snac.h
index f1fe13f..17bd361 100644
--- a/snac.h
+++ b/snac.h
@@ -98,6 +98,7 @@ int follower_check(snac *snac, const char *actor);
98d_char *follower_list(snac *snac); 98d_char *follower_list(snac *snac);
99 99
100double timeline_mtime(snac *snac); 100double timeline_mtime(snac *snac);
101int timeline_touch(snac *snac);
101int timeline_here(snac *snac, const char *md5); 102int timeline_here(snac *snac, const char *md5);
102int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg); 103int timeline_get_by_md5(snac *snac, const char *md5, xs_dict **msg);
103int timeline_del(snac *snac, char *id); 104int timeline_del(snac *snac, char *id);