snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 2416945748994def6a96163a939348a22ad541a3
parent ec5ba68d00a5db05f61f539a6cde9d9906388e83
Author: default <nobody@localhost>
Date:   Sun, 17 Nov 2024 10:23:43 +0100

In the insert cmdline op, don't re-add if it's already in the timeline.

Diffstat:
Mmain.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c @@ -558,7 +558,11 @@ int main(int argc, char *argv[]) if (data != NULL) { xs_json_dump(data, 4, stdout); enqueue_actor_refresh(&snac, xs_dict_get(data, "attributedTo"), 0); - timeline_add(&snac, url, data); + + if (!timeline_here(&snac, url)) + timeline_add(&snac, url, data); + else + printf("Post %s already here\n", url); } return 0;