feat: federate watch_medium in AP review objects

- add watch_medium field to ReviewObject (outbound + inbound)
- update_remote_review passes watch_medium to DB
- unknown values silently ignored on ingest
This commit is contained in:
2026-07-10 00:38:29 +02:00
parent f584bcd724
commit cde2f5aaae
5 changed files with 19 additions and 4 deletions

View File

@@ -79,15 +79,17 @@ impl RemoteReviewRepository for SqliteFederationRepository {
comment: Option<&str>,
watched_at: chrono::NaiveDateTime,
poster_url: Option<&str>,
watch_medium: Option<&str>,
) -> Result<()> {
let watched_at_str = datetime_to_str(&watched_at);
sqlx::query(
"UPDATE reviews SET rating = ?, comment = ?, watched_at = ?
"UPDATE reviews SET rating = ?, comment = ?, watched_at = ?, watch_medium = ?
WHERE ap_id = ? AND remote_actor_url = ?",
)
.bind(rating as i64)
.bind(comment)
.bind(&watched_at_str)
.bind(watch_medium)
.bind(ap_id)
.bind(actor_url)
.execute(&self.pool)