summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c14
-rw-r--r--data.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/activitypub.c b/activitypub.c
index 65eed05..2c0fa2e 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -669,20 +669,6 @@ xs_list *recipient_list(snac *snac, const xs_dict *msg, int expand_public)
669} 669}
670 670
671 671
672int is_msg_mine(snac *user, const char *id)
673/* returns true if a post id is by the given user */
674{
675 int ret = 0;
676
677 if (xs_is_string(id)) {
678 xs *s1 = xs_fmt("%s/", user->actor);
679 ret = xs_startswith(id, s1);
680 }
681
682 return ret;
683}
684
685
686int is_msg_public(const xs_dict *msg) 672int is_msg_public(const xs_dict *msg)
687/* checks if a message is public */ 673/* checks if a message is public */
688{ 674{
diff --git a/data.c b/data.c
index d291ba7..c2fdccb 100644
--- a/data.c
+++ b/data.c
@@ -1358,6 +1358,20 @@ int pending_count(snac *user)
1358} 1358}
1359 1359
1360 1360
1361int is_msg_mine(snac *user, const char *id)
1362/* returns true if a post id is by the given user */
1363{
1364 int ret = 0;
1365
1366 if (xs_is_string(id)) {
1367 xs *s1 = xs_fmt("%s/", user->actor);
1368 ret = xs_startswith(id, s1);
1369 }
1370
1371 return ret;
1372}
1373
1374
1361/** timeline **/ 1375/** timeline **/
1362 1376
1363double timeline_mtime(snac *snac) 1377double timeline_mtime(snac *snac)