feat(domain): add broadcast_like/broadcast_undo_like to OutboundFederationPort

This commit is contained in:
2026-05-15 04:47:19 +02:00
parent 9af1d33e71
commit 6d365dd3cf
3 changed files with 59 additions and 0 deletions

View File

@@ -249,6 +249,8 @@ mod tests {
updated: Mutex<Vec<ThoughtId>>,
announced: Mutex<Vec<String>>,
undo_announced: Mutex<Vec<String>>,
liked: Mutex<Vec<String>>,
undo_liked: Mutex<Vec<String>>,
}
#[async_trait]
@@ -287,6 +289,26 @@ mod tests {
self.undo_announced.lock().unwrap().push(ap_id.to_string());
Ok(())
}
async fn broadcast_like(
&self,
_: &UserId,
ap_id: &str,
_: &str,
) -> Result<(), DomainError> {
self.liked.lock().unwrap().push(ap_id.to_string());
Ok(())
}
async fn broadcast_undo_like(
&self,
_: &UserId,
ap_id: &str,
_: &str,
) -> Result<(), DomainError> {
self.undo_liked.lock().unwrap().push(ap_id.to_string());
Ok(())
}
}
fn alice() -> User {