AGPL-3.0-only, a source link in the app, and everything on dev since #5 #6

Merged
bvandeusen merged 214 commits from dev into main 2026-10-21 21:40:00 -04:00
3 changed files with 29 additions and 38 deletions
Showing only changes of commit 2809c26214 - Show all commits
+1 -21
View File
@@ -513,27 +513,7 @@ mod tests {
}
fn note(id: &str, revision: i64) -> wire::Note {
wire::Note {
id: id.to_string(),
body: "Body".into(),
position: 0,
pinned: false,
archived: false,
trashed: false,
deleted_at: None,
remind_at: None,
recurrence: None,
created_at: Some("2026-07-26T00:00:00.000Z".into()),
updated_at: Some("2026-07-26T00:00:00.000Z".into()),
sync_revision: revision,
purged_at: None,
labels: vec![],
attachments: vec![],
previews: vec![],
permission: None,
shared: false,
shared_by: None,
}
wire::sample_note(id, revision)
}
fn attachment(id: &str) -> wire::Attachment {
+1 -17
View File
@@ -1059,25 +1059,9 @@ mod tests {
use crate::sync::{pull, wire};
let conn = db();
let server_note = |revision: i64, attachments: Vec<wire::Attachment>| wire::Note {
id: "n1".into(),
body: "a note".into(),
position: 0,
pinned: false,
archived: false,
trashed: false,
deleted_at: None,
remind_at: None,
recurrence: None,
created_at: Some("2026-07-26T00:00:00.000Z".into()),
updated_at: Some("2026-07-26T00:00:00.000Z".into()),
sync_revision: revision,
purged_at: None,
labels: vec![],
attachments,
previews: vec![],
permission: None,
shared: false,
shared_by: None,
..wire::sample_note("n1", revision)
};
let page = |note: wire::Note, cursor: i64| wire::ChangesPage {
notes: vec![note],
+27
View File
@@ -165,3 +165,30 @@ fn default_color() -> String {
fn default_mime() -> String {
OPAQUE_MIME.to_string()
}
/// A plain note, this account's own and live, as a server sends it. For tests in
/// pull and push, which each wrote the whole literal out.
#[cfg(test)]
pub(crate) fn sample_note(id: &str, revision: i64) -> Note {
Note {
id: id.to_string(),
body: "Body".into(),
position: 0,
pinned: false,
archived: false,
trashed: false,
deleted_at: None,
remind_at: None,
recurrence: None,
created_at: Some("2026-07-26T00:00:00.000Z".into()),
updated_at: Some("2026-07-26T00:00:00.000Z".into()),
sync_revision: revision,
purged_at: None,
labels: vec![],
attachments: vec![],
previews: vec![],
permission: None,
shared: false,
shared_by: None,
}
}