Просмотр исходного кода

Moved is_msg_mine() to data.c.

grunfink 8 месяцев назад
Родитель
Сommit
46bb87c2b5
2 измененных файлов с 14 добавлено и 14 удалено
  1. 0 14
      activitypub.c
  2. 14 0
      data.c

+ 0 - 14
activitypub.c

@@ -669,20 +669,6 @@ 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 */
 {

+ 14 - 0
data.c

@@ -1358,6 +1358,20 @@ int pending_count(snac *user)
 }
 
 
+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;
+}
+
+
 /** timeline **/
 
 double timeline_mtime(snac *snac)