about summary refs log tree commit diff
path: root/src/micropub
diff options
context:
space:
mode:
Diffstat (limited to 'src/micropub')
-rw-r--r--src/micropub/post.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/micropub/post.rs b/src/micropub/post.rs
index 639346b..eaa603a 100644
--- a/src/micropub/post.rs
+++ b/src/micropub/post.rs
@@ -171,12 +171,7 @@ pub async fn new_post<S: Storage>(
     // This software might also be used in a multi-user setting
     // where several users or identities share one Micropub server
     // (maybe a family website or a shitpost sideblog?)
-    if post["properties"]["url"]
-        .as_array()
-        .unwrap()
-        .iter()
-        .any(|url| !url.as_str().unwrap().starts_with(user.me.as_str()))
-        || !post["properties"]["uid"][0]
+    if !post["properties"]["uid"][0]
             .as_str()
             .unwrap()
             .starts_with(user.me.as_str())
@@ -209,7 +204,7 @@ pub async fn new_post<S: Storage>(
         Err(err) => return Ok(err.into()),
     }
 
-    if let Err(err) = storage.put_post(&post).await {
+    if let Err(err) = storage.put_post(&post, user.me.as_str()).await {
         return error_json!(500, "database_error", format!("{}", err));
     }
 
@@ -303,7 +298,7 @@ async fn create_feed(
         }),
         &user,
     );
-    storage.put_post(&feed).await
+    storage.put_post(&feed, user.me.as_str()).await
 }
 
 async fn post_process_new_post<S: Storage>(