commit 46bb87c

grunfink  ·  2025-11-29 05:17:27 +0000 UTC
parent 5c2c7b2
Moved is_msg_mine() to data.c.
2 files changed,  +14, -14
M data.c
+0, -14
 1@@ -669,20 +669,6 @@ xs_list *recipient_list(snac *snac, const xs_dict *msg, int expand_public)
 2 }
 3 
 4 
 5-int is_msg_mine(snac *user, const char *id)
 6-/* returns true if a post id is by the given user */
 7-{
 8-    int ret = 0;
 9-
10-    if (xs_is_string(id)) {
11-        xs *s1 = xs_fmt("%s/", user->actor);
12-        ret = xs_startswith(id, s1);
13-    }
14-
15-    return ret;
16-}
17-
18-
19 int is_msg_public(const xs_dict *msg)
20 /* checks if a message is public */
21 {
M data.c
+14, -0
 1@@ -1358,6 +1358,20 @@ int pending_count(snac *user)
 2 }
 3 
 4 
 5+int is_msg_mine(snac *user, const char *id)
 6+/* returns true if a post id is by the given user */
 7+{
 8+    int ret = 0;
 9+
10+    if (xs_is_string(id)) {
11+        xs *s1 = xs_fmt("%s/", user->actor);
12+        ret = xs_startswith(id, s1);
13+    }
14+
15+    return ret;
16+}
17+
18+
19 /** timeline **/
20 
21 double timeline_mtime(snac *snac)