]> Untitled Git - lemmy.git/blobdiff - crates/api/src/community.rs
Adding ModTransferCommunity to modlog in API. Fixes #1437
[lemmy.git] / crates / api / src / community.rs
index 0ca4ac47ad8be6406ac475690bbcab78af439924..18a4dc4613381a00100c9538cb6216ff89278335 100644 (file)
@@ -399,16 +399,14 @@ impl Perform for TransferCommunity {
     }
 
     // Mod tables
-    // TODO there should probably be another table for transfer community
-    // Right now, it will just look like it modded them twice
-    let form = ModAddCommunityForm {
+    let form = ModTransferCommunityForm {
       mod_person_id: local_user_view.person.id,
       other_person_id: data.person_id,
       community_id: data.community_id,
       removed: Some(false),
     };
     blocking(context.pool(), move |conn| {
-      ModAddCommunity::create(conn, &form)
+      ModTransferCommunity::create(conn, &form)
     })
     .await??;