diff options
| author | grunfink <grunfink@comam.es> | 2025-11-29 06:08:37 +0100 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-11-29 06:08:37 +0100 |
| commit | 5c2c7b27aca8bec59f90007481e5e2c6e961827f (patch) | |
| tree | d07dd72c332c45a8855363a52dd74267e482ef22 /activitypub.c | |
| parent | fcae55fcb1542f6fa0a330c45e3b806f902a84de (diff) | |
New function is_msg_mine().
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 2c0fa2e..65eed05 100644 --- a/activitypub.c +++ b/activitypub.c @@ -669,6 +669,20 @@ xs_list *recipient_list(snac *snac, const xs_dict *msg, int expand_public) } +int is_msg_mine(snac *user, const char *id) +/* returns true if a post id is by the given user */ +{ + int ret = 0; + + if (xs_is_string(id)) { + xs *s1 = xs_fmt("%s/", user->actor); + ret = xs_startswith(id, s1); + } + + return ret; +} + + int is_msg_public(const xs_dict *msg) /* checks if a message is public */ { |