From c944cee98cad49c80d1c4b50a0c1b87579d4b9dc Mon Sep 17 00:00:00 2001 From: unRekable Date: Sat, 5 Dec 2026 15:32:19 +0100 Subject: [PATCH] Name who made a Signal group change, tell the stored group with it, and say why a group this account is out of is read-only --- crates/chatd/src/adapters/signal.rs | 174 ++++++++++- crates/chatd/src/adapters/signal/fake.rs | 137 ++++++-- crates/chatd/src/adapters/signal/real.rs | 79 +++-- crates/chatd/src/adapters/signal/wire.rs | 6 +- crates/chatd/tests/signal.rs | 69 +++- .../signal-group-change-lines/drive.linux.sh | 9 + .../signal-group-change-lines/drive.macos.sh | 9 + .../signal-group-change-lines/drive.py | 295 ++++++++++++++++++ .../drive.windows.ps1 | 17 + .../signal-group-change-lines/scenario.json | 12 + 10 files changed, 723 insertions(+), 84 deletions(-) create mode 100644 e2e/scenarios/signal-group-change-lines/drive.linux.sh create mode 100644 e2e/scenarios/signal-group-change-lines/drive.macos.sh create mode 100644 e2e/scenarios/signal-group-change-lines/drive.py create mode 100644 e2e/scenarios/signal-group-change-lines/drive.windows.ps1 create mode 100644 e2e/scenarios/signal-group-change-lines/scenario.json diff --git a/crates/chatd/src/adapters/signal.rs b/crates/chatd/src/adapters/signal.rs index 02671b66..bb87fddb 100644 --- a/crates/chatd/src/adapters/signal.rs +++ b/crates/chatd/src/adapters/signal.rs @@ -299,6 +299,8 @@ fn group_admin_action(person: &str) -> Option<(&str, bool)> { } /// What a person with no name we know is called. const NO_NAME: &str = "Signal user"; +/// What a row says when this account is out of a Signal group and cannot write in it. +const LEFT_GROUP: &str = "You are no longer in this group"; fn now_ms() -> u64 { std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |since| since.as_millis() as u64) @@ -353,6 +355,11 @@ impl GroupRevisions { self.known.entry(id).or_insert((revision, snap)); } + /// The last revision applied for a group, when it is tracked. + pub fn revision(&self, id: &str) -> Option { + self.known.get(id).map(|(revision, _)| *revision) + } + /// True only when `id` is tracked and `revision` is strictly newer than the last applied one. pub fn should_check(&self, id: &str, revision: u32) -> bool { self.known.get(id).is_some_and(|(known_rev, _)| revision > *known_rev) @@ -370,6 +377,43 @@ impl GroupRevisions { } } +/// What one message says about a group that moved forward. Who sent it is the one part the +/// Signal protocol vouches for: the bytes of the change on the message are not read, because +/// nothing in the libraries here checks the server's signature on them (`real.rs`, +/// `note_group_change`). +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct GroupStep<'a> { + /// Who sent the message. + pub author: &'a str, + /// The message carries a change. A device sends that to the group right after it changed the + /// group (`patch_group`); a message that only names the revision came from whoever wrote next. + pub announces: bool, + /// The revision the message names. + pub told: u32, + /// The revision applied before this one. + pub previous: u32, + /// The revision stored now. + pub stored: u32, + /// The stored group is what the server gave, not one made here after it refused to hand the + /// group over because this account is out of it. + pub from_server: bool, +} + +impl GroupStep<'_> { + /// Whether the author made this change, so that the lines can say who did. That is so only + /// when the message announces the change, the stored group is the server's and exactly one + /// revision on from the last one applied, the message names that revision, and the author is + /// someone a change can have come from: a member before or after. More than one revision at + /// once can be the work of several people, and a group made here says nothing about who. + pub fn names_author(&self, before: &GroupSnap, after: &GroupSnap) -> bool { + self.announces + && self.from_server + && self.stored == self.told + && self.stored == self.previous.saturating_add(1) + && (before.members.iter().any(|member| member.id == self.author) || after.members.iter().any(|member| member.id == self.author)) + } +} + fn person(id: &str, me: &str, name: &impl Fn(&str) -> String) -> String { if id == me { "You".to_owned() @@ -396,7 +440,9 @@ fn duration(secs: u32) -> String { /// The lines and the row fields for one group revision. The first snapshot of a connection is not /// passed here: a connect has no "before", so it shows the current name and no system lines. -pub fn group_delta(before: &GroupSnap, after: &GroupSnap, me: &str, name: impl Fn(&str) -> String) -> GroupDelta { +/// `by` is who made the change when that can be said (`GroupStep`), and empty when it cannot: +/// the lines then say that someone joined or is gone, not who made it so. +pub fn group_delta(before: &GroupSnap, after: &GroupSnap, me: &str, by: &str, name: impl Fn(&str) -> String) -> GroupDelta { let mut lines = Vec::new(); let title = (before.title != after.title).then(|| { lines.push(format!("The group name is now {}", after.title)); @@ -425,6 +471,8 @@ pub fn group_delta(before: &GroupSnap, after: &GroupSnap, me: &str, name: impl F } let was: HashMap<&str, bool> = before.members.iter().map(|member| (member.id.as_str(), member.admin)).collect(); let now: HashMap<&str, bool> = after.members.iter().map(|member| (member.id.as_str(), member.admin)).collect(); + let pending: HashSet<&str> = before.pending.iter().map(String::as_str).collect(); + let asking: HashSet<&str> = before.requesting.iter().map(String::as_str).collect(); let mut joined: Vec<&str> = now.keys().copied().filter(|id| !was.contains_key(id)).collect(); joined.sort_unstable(); let mut rejoined = false; @@ -432,7 +480,16 @@ pub fn group_delta(before: &GroupSnap, after: &GroupSnap, me: &str, name: impl F if id == me { rejoined = true; } - lines.push(format!("{} joined the group", person(id, me, &name))); + let one = person(id, me, &name); + let them = if id == me { "you" } else { one.as_str() }; + lines.push(if by == id && !pending.contains(id) && !asking.contains(id) { + // Nobody gets themselves into a group without an invitation, except through its link. + format!("{one} joined the group using the group link") + } else if by.is_empty() || by == id { + format!("{one} joined the group") + } else { + format!("{} added {them} to the group", person(by, me, &name)) + }); } let mut stayed: Vec<&str> = now.keys().copied().filter(|id| was.get(id).is_some_and(|admin| *admin != now[id])).collect(); stayed.sort_unstable(); @@ -453,18 +510,22 @@ pub fn group_delta(before: &GroupSnap, after: &GroupSnap, me: &str, name: impl F for id in gone { if id == me { left = true; - lines.push("You are no longer in this group".to_owned()); - } else { - lines.push(format!("{} is no longer in the group", person(id, me, &name))); } + let one = person(id, me, &name); + let them = if id == me { "you" } else { one.as_str() }; + lines.push(if by == id { + format!("{one} left the group") + } else if by.is_empty() { + if id == me { LEFT_GROUP.to_owned() } else { format!("{one} is no longer in the group") } + } else { + format!("{} removed {them} from the group", person(by, me, &name)) + }); } - let pending: HashSet<&str> = before.pending.iter().map(String::as_str).collect(); let mut invited: Vec<&str> = after.pending.iter().map(String::as_str).filter(|id| !pending.contains(id) && !now.contains_key(id)).collect(); invited.sort_unstable(); for id in invited { lines.push(format!("{} was invited", person(id, me, &name))); } - let asking: HashSet<&str> = before.requesting.iter().map(String::as_str).collect(); let mut requests: Vec<&str> = after.requesting.iter().map(String::as_str).filter(|id| !asking.contains(id)).collect(); requests.sort_unstable(); for id in requests { @@ -477,12 +538,12 @@ pub fn group_delta(before: &GroupSnap, after: &GroupSnap, me: &str, name: impl F pub fn prove_signal_group_rename() -> Result<(), String> { let before = GroupSnap { title: "Bridge club".into(), ..GroupSnap::default() }; let after = GroupSnap { title: "Wednesday club".into(), ..GroupSnap::default() }; - let delta = group_delta(&before, &after, "me", |_| String::new()); + let delta = group_delta(&before, &after, "me", "", |_| String::new()); if delta.title.as_deref() != Some("Wednesday club") || delta.lines != ["The group name is now Wednesday club"] || delta.left { return Err("a renamed group must take the new name and one line".into()); } let member = GroupSnap { members: vec![MemberSnap { id: "me".into(), admin: false }], ..GroupSnap::default() }; - let left = group_delta(&member, &GroupSnap::default(), "me", |_| String::new()); + let left = group_delta(&member, &GroupSnap::default(), "me", "", |_| String::new()); if !left.left || left.lines != ["You are no longer in this group"] { return Err("leaving the group must say so".into()); } @@ -2059,9 +2120,15 @@ fn apply(account: &Account, event: Event) { let mut row = row(&peer, &group.title); row.topic = group.description.chars().take(300).collect(); row.read_only = !group.member || (group.announcements_only && !is_admin); - if group.member && group.announcements_only && !is_admin { - row.read_only_reason = "Only admins can send messages".to_owned(); - } + // Someone out of the group for good is told so; someone invited, or waiting to + // be let in, is not. + row.read_only_reason = if !group.member && !group.waiting { + LEFT_GROUP.to_owned() + } else if group.member && group.announcements_only && !is_admin { + "Only admins can send messages".to_owned() + } else { + String::new() + }; row.rights = rights; row.avatar = ctx.avatar_of(&row.id); let _ = ctx.conversation(&row); @@ -2085,11 +2152,15 @@ fn apply(account: &Account, event: Event) { } else { known.as_ref().is_some_and(|row| row.read_only) }; + row.read_only_reason = if left { + LEFT_GROUP.to_owned() + } else if rejoined { + String::new() + } else { + known.as_ref().map(|row| row.read_only_reason.clone()).unwrap_or_default() + }; if let Some(known) = &known { row.rights = known.rights; - if !rejoined { - row.read_only_reason = known.read_only_reason.clone(); - } } row.avatar = ctx.avatar_of(&row.id); let _ = ctx.conversation(&row); @@ -7629,13 +7700,82 @@ mod tests { fn rejoining_a_group_sets_rejoined_and_clears_left() { let out = GroupSnap::default(); let inside = GroupSnap { members: vec![MemberSnap { id: "me".into(), admin: false }], ..GroupSnap::default() }; - let left = group_delta(&inside, &out, "me", |_| String::new()); + let left = group_delta(&inside, &out, "me", "", |_| String::new()); assert!(left.left && !left.rejoined); - let back = group_delta(&out, &inside, "me", |_| String::new()); + let back = group_delta(&out, &inside, "me", "", |_| String::new()); assert!(!back.left && back.rejoined); assert_eq!(back.lines, ["You joined the group"]); } + /// One group: me, Grace and Alan. + fn club() -> GroupSnap { + GroupSnap { members: vec![MemberSnap { id: "me".into(), admin: true }, MemberSnap { id: "grace".into(), admin: false }, MemberSnap { id: "alan".into(), admin: false }], ..GroupSnap::default() } + } + + /// The same members but one. + fn minus(members: Vec, id: &str) -> Vec { + members.into_iter().filter(|member| member.id != id).collect() + } + + fn named(id: &str) -> String { + match id { + "grace" => "Grace Ombra".into(), + "alan" => "Alan Ferro".into(), + _ => String::new(), + } + } + + #[test] + fn a_change_is_named_to_its_author_only_when_the_message_announces_it() { + let before = club(); + let alan_gone = GroupSnap { members: minus(before.members.clone(), "alan"), ..GroupSnap::default() }; + // The message that tells of the change carries it, and names the revision stored. + let said = |step: GroupStep| step.names_author(&before, &alan_gone); + let whole = GroupStep { author: "grace", announces: true, told: 6, previous: 5, stored: 6, from_server: true }; + assert!(said(whole)); + // Whoever wrote next did not make the change. + assert!(!said(GroupStep { announces: false, ..whole })); + // Two revisions at once may be two people's work. + assert!(!said(GroupStep { previous: 4, ..whole })); + // A group made here, after the server refused to hand it over, says nothing about who. + assert!(!said(GroupStep { from_server: false, ..whole })); + // The message names another revision than the one stored. + assert!(!said(GroupStep { told: 5, ..whole })); + assert!(!said(GroupStep { told: 7, ..whole })); + // Someone who is not a member before or after did not make it. + assert!(!said(GroupStep { author: "stranger", ..whole })); + // The one who left, or who joined, sent it themselves. + let alan_left = GroupStep { author: "alan", ..whole }; + assert!(alan_left.names_author(&before, &alan_gone)); + let alan_back = before.clone(); + assert!(GroupStep { author: "alan", ..whole }.names_author(&alan_gone, &alan_back)); + } + + #[test] + fn a_group_delta_names_who_added_who_removed_and_who_left() { + let full = club(); + let alan_out = GroupSnap { members: minus(full.members.clone(), "alan"), ..GroupSnap::default() }; + // Grace adds Alan, and Alan gets in through the link himself. + assert_eq!(group_delta(&alan_out, &full, "me", "grace", named).lines, ["Grace Ombra added Alan Ferro to the group"]); + assert_eq!(group_delta(&alan_out, &full, "me", "alan", named).lines, ["Alan Ferro joined the group using the group link"]); + // Someone who was invited first joined by taking the invitation. + let invited = GroupSnap { pending: vec!["alan".into()], ..alan_out.clone() }; + assert_eq!(group_delta(&invited, &full, "me", "alan", named).lines, ["Alan Ferro joined the group"]); + // Leaving and being removed read differently, and this account reads as "you". + assert_eq!(group_delta(&full, &alan_out, "me", "alan", named).lines, ["Alan Ferro left the group"]); + assert_eq!(group_delta(&full, &alan_out, "me", "grace", named).lines, ["Grace Ombra removed Alan Ferro from the group"]); + let me_out = GroupSnap { members: minus(full.members.clone(), "me"), ..GroupSnap::default() }; + assert_eq!(group_delta(&full, &me_out, "me", "grace", named).lines, ["Grace Ombra removed you from the group"]); + assert_eq!(group_delta(&full, &me_out, "me", "me", named).lines, ["You left the group"]); + assert_eq!(group_delta(&me_out, &full, "me", "grace", named).lines, ["Grace Ombra added you to the group"]); + // Without a name for who did it, the lines stay as they were. + assert_eq!(group_delta(&alan_out, &full, "me", "", named).lines, ["Alan Ferro joined the group"]); + assert_eq!(group_delta(&full, &alan_out, "me", "", named).lines, ["Alan Ferro is no longer in the group"]); + assert_eq!(group_delta(&full, &me_out, "me", "", named).lines, [LEFT_GROUP]); + let removed = group_delta(&full, &me_out, "me", "grace", named); + assert!(removed.left && !removed.rejoined); + } + #[test] fn a_group_is_seen_only_when_every_other_member_has_read() { super::prove_signal_message_info().unwrap(); diff --git a/crates/chatd/src/adapters/signal/fake.rs b/crates/chatd/src/adapters/signal/fake.rs index 2723f502..38fa5aeb 100644 --- a/crates/chatd/src/adapters/signal/fake.rs +++ b/crates/chatd/src/adapters/signal/fake.rs @@ -11,6 +11,7 @@ //! | `incoming WHO SENT TEXT…` | WHO wrote TEXT to us, sent at SENT (ms) | //! | `group WHO SENT TEXT…` | the same, in the group | //! | `group-title TITLE…` | the group was renamed to TITLE | +//! | `group-join WHO [BY]`, `group-left WHO [BY]` | WHO joined or is gone. BY added or removed them, `self` means they did it themselves, and no BY names no one | //! | `mention WHO SENT TEXT…` | the same, in the group, naming us | //! | `photo WHO SENT` | WHO sent a photo with no caption | //! | `payment WHO SENT NOTE…` | WHO sent a payment notification; its note, when words follow | @@ -40,11 +41,12 @@ //! | `lookup USERNAME ACI` | a later username search for USERNAME answers ACI | //! | `drop`, `unlinked` | the connection ends; the phone removed this device | //! -//! WHO is `grace` or `alan`. Every request it is sent is appended to `signal.calls`, one line -//! each, so a test can see what the network would have heard. +//! WHO is `grace` or `alan`; in a group change it is also `me`. Every request it is sent is +//! appended to `signal.calls`, one line each, so a test can see what the network would have heard. //! //! The account: Ada Quill (us); Grace Ombra and Alan Ferro, both contacts; the group "Bridge -//! club" with all three of us in it. +//! club" with all three of us in it. A scripted group change tells the lines between what the +//! group was and what it is, then the stored group whole, as the real wire does. use super::wire::{ call_link_room_id, encode_group_call_signal, format_call_link, format_group_invite_link, gift_badge_label, @@ -56,7 +58,7 @@ use super::wire::{ Sticker, StickerEntry, StickerPackInfo, StorageSnapshot, StoryContext, StoryDistributionList, StoryMessageData, StoryText, Text, TransferOutcome, TransferProgress, TurnServer, Wire, FLAG_GIF, FLAG_VOICE_MESSAGE, }; -use super::Saved; +use super::{group_delta, GroupSnap, MemberSnap, Saved}; use crate::adapters::script; use std::collections::HashMap; use std::io::Write; @@ -87,6 +89,24 @@ fn who(word: &str) -> Option<(&'static str, &'static str)> { } } +/// A person a scripted group change can name: us, Grace or Alan. +fn member(word: &str) -> Option<(&'static str, &'static str)> { + match word { + "me" => Some((ME, "Ada Quill")), + other => who(other), + } +} + +/// What a group change's lines call a person: their name, by id (`group_delta` asks by id). +fn named(id: &str) -> String { + match id { + ME => "Ada Quill".to_owned(), + GRACE => "Grace Ombra".to_owned(), + ALAN => "Alan Ferro".to_owned(), + _ => String::new(), + } +} + fn record(line: &str) { let path = protocol::support_dir().join("signal.calls"); if let Ok(mut file) = std::fs::OpenOptions::new().create(true).append(true).open(path) { @@ -116,6 +136,7 @@ impl FakeGroup { description: "Tuesdays, 7 pm".into(), members: 3, member: true, + waiting: false, member_ids: vec![ME.into(), GRACE.into(), ALAN.into()], admins: vec![ME.into()], member_access: GroupAccess::Member, @@ -136,9 +157,34 @@ impl FakeGroup { fn sync_info(&mut self) { self.info.members = self.members.len() as u32; self.info.member = self.members.iter().any(|m| m.id == ME); + self.info.waiting = self.pending.iter().any(|m| m.id == ME) || self.requesting.iter().any(|m| m.id == ME); self.info.member_ids = self.members.iter().map(|m| m.id.clone()).collect(); self.info.admins = self.members.iter().filter(|m| m.admin).map(|m| m.id.clone()).collect(); } + + /// The group as a change compares it, as the real wire's `snap_of` reads a stored group. + fn snap(&self) -> GroupSnap { + GroupSnap { + title: self.info.title.clone(), + description: self.info.description.clone(), + timer_secs: self.info.timer_secs, + members: self.members.iter().map(|member| MemberSnap { id: member.id.clone(), admin: member.admin }).collect(), + pending: self.pending.iter().map(|member| member.id.clone()).collect(), + requesting: self.requesting.iter().map(|member| member.id.clone()).collect(), + link: self.info.invite_link_access == GroupAccess::Any, + ..GroupSnap::default() + } + } + + /// Puts someone in the group: off the invited and the asking lists, among the members. + fn join(&mut self, id: &str) { + self.pending.retain(|member| member.id != id); + self.requesting.retain(|member| member.id != id); + if !self.members.iter().any(|member| member.id == id) { + let name = named(id); + self.members.push(GroupMember { id: id.to_owned(), name: name.into(), admin: false }); + } + } } #[derive(Clone)] @@ -622,7 +668,7 @@ impl Fake { let _ = events.send(Event::Groups(vec![g.info.clone()])); return true; } - for event in steer(line, &identities) { + for event in steer(line, &identities, &club) { let _ = events.send(event); } true @@ -631,8 +677,33 @@ impl Fake { } } +/// A scripted change to the group, told the way the real wire tells one (`real.rs`, +/// `note_group_change`): the lines between what the group was and what it is, naming `by` when +/// that is someone, then the stored group whole. +fn changed(club: &Mutex, by: &str, edit: impl FnOnce(&mut FakeGroup)) -> Vec { + let mut group = club.lock().unwrap_or_else(|poisoned| poisoned.into_inner()); + let before = group.snap(); + edit(&mut group); + group.sync_info(); + let delta = group_delta(&before, &group.snap(), ME, by, named); + let mut events = Vec::new(); + if !delta.lines.is_empty() { + events.push(Event::GroupChanged { + peer: Peer::Group(CLUB.to_owned()), + by: by.to_owned(), + changes: delta.lines, + title: delta.title, + description: delta.description, + left: delta.left, + rejoined: delta.rejoined, + }); + } + events.push(Event::Groups(vec![group.info.clone()])); + events +} + /// One line from the test: what Signal then says unasked. -fn steer(line: &str, identities: &Mutex>) -> Vec { +fn steer(line: &str, identities: &Mutex>, stored: &Mutex) -> Vec { let mut words = line.split_whitespace(); let command = words.next().unwrap_or(""); let mut next = || words.next().unwrap_or(""); @@ -959,34 +1030,31 @@ fn steer(line: &str, identities: &Mutex>) -> Vec changed(stored, "", |group| group.members.retain(|member| member.id != ME)), + "group-rejoin" => changed(stored, "", |group| group.join(ME)), + // BY names who did it, and `self` is WHO: nobody is named when BY is left out. + "group-join" | "group-left" => { + let Some((id, _)) = member(next()) else { + return Vec::new(); + }; + let by = match next() { + "" => "", + "self" => id, + word => match member(word) { + Some((by, _)) => by, + None => return Vec::new(), + }, + }; + changed(stored, by, |group| { + if command == "group-join" { + group.join(id); + } else { + group.members.retain(|member| member.id != id); + } + }) } - "group-leave" => vec![Event::GroupChanged { - peer: club(), - by: String::new(), - changes: vec!["You are no longer in this group".to_owned()], - title: None, - description: None, - left: true, - rejoined: false, - }], - "group-rejoin" => vec![Event::GroupChanged { - peer: club(), - by: String::new(), - changes: vec!["You joined the group".to_owned()], - title: None, - description: None, - left: false, - rejoined: true, - }], "chat-state" => { let target = next(); let peer = if target == "club" { @@ -1182,6 +1250,7 @@ fn steer(line: &str, identities: &Mutex>) -> Vec GroupAccess { } } -/// The stored group, as a change compares it. Presage fetched this; the message's unsigned change is not read. +/// The stored group, as a change compares it. Presage fetched this; the change on the message is not read. fn snap_of(group: &Group) -> GroupSnap { let mut members: Vec = group .members @@ -1325,6 +1325,8 @@ impl Session { let snap = snap_of(&group); let timer_secs = snap.timer_secs; let member = snap.members.iter().any(|member| member.id == self.me); + let waiting = group.pending_members.iter().any(|member| member.uuid.to_string() == self.me) + || group.requesting_members.iter().any(|member| member.aci.service_id_string() == self.me); let member_ids = group.members.iter().map(|member| ServiceId::from(member.aci).raw_uuid().to_string()).collect(); let admins = group .members @@ -1348,6 +1350,7 @@ impl Session { description: group.description.unwrap_or_default(), members: group.members.len() as u32, member, + waiting, member_ids, admins, member_access, @@ -1395,9 +1398,10 @@ impl Session { name } - /// Where a data message belongs: its group, or the person. - /// A newer revision is read from the stored group. The unsigned change on the message is not trusted. - async fn peer(&mut self, group: Option<&GroupContextV2>, person: &str) -> Peer { + /// Where a data message belongs: its group, or the person. A newer revision is read from the + /// stored group; the change on the message is not (`note_group_change`). `author` is who sent + /// it, which for a message from another of our devices is us, not who it went to. + async fn peer(&mut self, group: Option<&GroupContextV2>, author: &str, person: &str) -> Peer { let key = group.and_then(|group| group.master_key.as_deref()).and_then(|key| <[u8; 32]>::try_from(key).ok()); match key { Some(key) => { @@ -1408,7 +1412,8 @@ impl Session { return Peer::Group(id); } if let Some(revision) = group.and_then(|group| group.revision) { - self.note_group_change(&id, &key, revision).await; + let announces = group.and_then(|group| group.group_change.as_deref()).is_some_and(|change| !change.is_empty()); + self.note_group_change(&id, &key, revision, author, announces).await; } Peer::Group(id) } @@ -1447,15 +1452,27 @@ impl Session { out } - /// The stored group moved forward. One system line per change, and the row fields the adapter applies. - async fn note_group_change(&mut self, id: &str, key: &[u8; 32], revision: u32) { + /// The stored group moved forward. One system line per change, then the stored group whole, + /// so the row and what the adapter knows of the group end as the stored group has them. + async fn note_group_change(&mut self, id: &str, key: &[u8; 32], revision: u32, author: &str, announces: bool) { if !self.known.should_check(id, revision) { return; } - // Presage has already fetched this revision into the vault. The message's group_change bytes are not read. + let Some(previous) = self.known.revision(id) else { + return; + }; + // The group below is what presage, or `fetch_group`, got from the server. The change on the + // message is not read, and nothing here could vouch for it: the libraries pinned in + // Cargo.toml do not check the server's signature on it. libsignal-service f449930 drops + // `server_signature` in `decrypt_group_change` (groups_v2/operations.rs), presage 9e1f0b8 + // only fetches the group again (`upsert_group`), and neither of them nor this tree calls + // zkgroup's `ServerPublicParams::verify_signature`. So who made the change is taken from + // who sent the message, which the Signal protocol names truly. let Some(mut group) = self.vault.group_keys().ok().and_then(|groups| groups.into_iter().find(|(stored, _)| stored == key).map(|(_, group)| group)) else { return; }; + // False once this account is out of the group and the row was made here from that answer. + let mut from_server = true; if group.revision < revision { // The fetch behind this message failed, which is all a removed member ever gets. // Ask once more: the answer is the new group, or that we are out of it. Any other @@ -1466,6 +1483,7 @@ impl Session { let me = self.me.clone(); group.members.retain(|m| ServiceId::from(m.aci).raw_uuid().to_string() != me); group.revision = revision; + from_server = false; } Err(_) => return, } @@ -1476,33 +1494,35 @@ impl Session { }; group = kept; } - let stored_revision = group.revision; + let stored = group.revision; let after = snap_of(&group); - let Some(before) = self.known.advance(id, stored_revision, after.clone()) else { + let Some(before) = self.known.advance(id, stored, after.clone()) else { return; }; let me = self.me.clone(); + let step = GroupStep { author, announces, told: revision, previous, stored, from_server }; + let by = if step.names_author(&before, &after) { author } else { "" }; let mut names = HashMap::new(); - for person in people_who_changed(&before, &after) { - if person == me { + for person in people_who_changed(&before, &after).into_iter().chain(std::iter::once(by.to_owned())) { + if person == me || person.is_empty() { continue; } let name = self.name_of(&person).await; names.insert(person, name); } - let delta = group_delta(&before, &after, &me, |person| names.get(person).cloned().unwrap_or_default()); - if delta.lines.is_empty() { - return; + let delta = group_delta(&before, &after, &me, by, |person| names.get(person).cloned().unwrap_or_default()); + if !delta.lines.is_empty() { + self.tell(Event::GroupChanged { + peer: Peer::Group(id.to_owned()), + by: by.to_owned(), + changes: delta.lines, + title: delta.title, + description: delta.description, + left: delta.left, + rejoined: delta.rejoined, + }); } - self.tell(Event::GroupChanged { - peer: Peer::Group(id.to_owned()), - by: String::new(), - changes: delta.lines, - title: delta.title, - description: delta.description, - left: delta.left, - rejoined: delta.rejoined, - }); + self.groups_changed().await; } /// A long text read whole from its attachment. None when it is not one, or the read failed. @@ -1791,12 +1811,12 @@ impl Session { let sent = content.metadata.timestamp.timestamp_millis().max(0) as u64; match content.body { ContentBody::DataMessage(message) => { - let peer = self.peer(message.group_v2.as_ref(), &sender).await; + let peer = self.peer(message.group_v2.as_ref(), &sender, &sender).await; let sent = message.timestamp.unwrap_or(sent); self.data(&message, &sender, peer, sent, false).await; } ContentBody::EditMessage(EditMessage { target_sent_timestamp, data_message: Some(message) }) => { - let peer = self.peer(message.group_v2.as_ref(), &sender).await; + let peer = self.peer(message.group_v2.as_ref(), &sender, &sender).await; let styled = self.text(&message, &sender, sent).await; let at = message.timestamp.unwrap_or(sent); self.tell(Event::Edited { peer, author: sender, target: target_sent_timestamp.unwrap_or(0), at, text: styled.text, spans: styled.spans }); @@ -1985,7 +2005,7 @@ impl Session { let destination = sent_to(&sent); let me = self.me.clone(); if let Some(message) = &sent.message { - let peer = self.peer(message.group_v2.as_ref(), destination.as_deref().unwrap_or(&me)).await; + let peer = self.peer(message.group_v2.as_ref(), &me, destination.as_deref().unwrap_or(&me)).await; let at = sent.timestamp.or(message.timestamp).unwrap_or(0); self.data(message, &me, peer, at, true).await; } @@ -1994,7 +2014,7 @@ impl Session { self.story_message(story.clone(), &me, at, true).await; } if let Some(EditMessage { target_sent_timestamp, data_message: Some(message) }) = &sent.edit_message { - let peer = self.peer(message.group_v2.as_ref(), destination.as_deref().unwrap_or(&me)).await; + let peer = self.peer(message.group_v2.as_ref(), &me, destination.as_deref().unwrap_or(&me)).await; let styled = self.text(message, &me, 0).await; let at = message.timestamp.or(sent.timestamp).unwrap_or(0); self.tell(Event::Edited { peer, author: me, target: target_sent_timestamp.unwrap_or(0), at, text: styled.text, spans: styled.spans }); @@ -2723,6 +2743,7 @@ impl Session { description: String::new(), members: member_ids.len() as u32, member: true, + waiting: false, member_ids, admins: vec![self.me.clone()], member_access: GroupAccess::Member, diff --git a/crates/chatd/src/adapters/signal/wire.rs b/crates/chatd/src/adapters/signal/wire.rs index ee58267b..b0f27481 100644 --- a/crates/chatd/src/adapters/signal/wire.rs +++ b/crates/chatd/src/adapters/signal/wire.rs @@ -239,6 +239,9 @@ pub struct GroupInfo { pub members: u32, /// Whether this account is currently a member of the group. pub member: bool, + /// This account is not a member yet, and is on the way in: invited, or waiting for an admin + /// to let it in. Not someone who left or was removed. + pub waiting: bool, /// Account ids of the members, including us. Empty when the wire has not said who. pub member_ids: Vec, /// Account ids of the group's administrators. @@ -861,7 +864,8 @@ pub enum Event { /// One group changed after that snapshot. `changes` is one system line each. GroupChanged { peer: Peer, - /// Who did it, when the change names them. Empty when it does not. + /// Who made the change, as an account id, when the wire can say who did. Empty when it + /// cannot. The lines name the same person. by: String, changes: Vec, /// Set when the name changed, so the row can take it without reading the line. diff --git a/crates/chatd/tests/signal.rs b/crates/chatd/tests/signal.rs index 00d0e765..e3138b1f 100644 --- a/crates/chatd/tests/signal.rs +++ b/crates/chatd/tests/signal.rs @@ -210,6 +210,13 @@ impl World { self.until(&format!("message {id} in {conversation}"), || self.messages(conversation).into_iter().find(|message| message.id == id)) } + /// A system line with these words, once the store has it. + fn system_line(&self, conversation: &str, text: &str) -> Message { + self.until(&format!("the line {text:?} in {conversation}"), || { + self.messages(conversation).into_iter().find(|message| message.kind == MessageKind::System && message.text == text) + }) + } + fn send(&self, conversation: &str, client_id: &str, text: &str, reply_to: Option<&str>) -> Message { let asked = Request::Send { conversation: key(conversation), client_id: client_id.into(), text: text.into(), reply_to: reply_to.map(str::to_owned), with: Default::default() }; match self.ask(asked) { @@ -1174,15 +1181,69 @@ fn a_renamed_group_takes_the_new_name_and_one_system_row() { assert_eq!(systems[0].text, "The group name is now Wednesday club"); assert!(!world.conversation(CLUB).unwrap().read_only); - // Leaving marks the group read-only, a rename while removed keeps it read-only, - // and being re-added clears read-only again. + // Leaving marks the group read-only and says why. A snapshot told later, as every change + // tells one, keeps that, and so does a rename while removed; being re-added clears both. world.steer("group-leave"); world.until("read-only after leave", || world.conversation(CLUB)?.read_only.then_some(())); + assert_eq!(world.conversation(CLUB).unwrap().read_only_reason, "You are no longer in this group"); + world.system_line(CLUB, "You are no longer in this group"); + let (_, seq) = world.status(); + world.steer("group-role grace admin"); + world.changed(seq, "the group told whole again", |change| match change { + Change::Conversation { conversation } if conversation.id == CLUB => Some(()), + _ => None, + }); + let later = world.conversation(CLUB).unwrap(); + assert!(later.read_only); + assert_eq!(later.read_only_reason, "You are no longer in this group"); world.steer("group-title Thursday club"); world.until("renamed while removed", || (world.conversation(CLUB)?.title == "Thursday club").then_some(())); - assert!(world.conversation(CLUB).unwrap().read_only); + let renamed = world.conversation(CLUB).unwrap(); + assert!(renamed.read_only); + assert_eq!(renamed.read_only_reason, "You are no longer in this group"); world.steer("group-rejoin"); world.until("writable after rejoin", || (!world.conversation(CLUB)?.read_only).then_some(())); + assert!(world.conversation(CLUB).unwrap().read_only_reason.is_empty()); +} + +/// A change says who made it: who removed someone, who got in through the link or by taking an +/// invitation, who left by themselves. The stored group is told with every change, so what the +/// adapter knows of the group follows. +#[test] +fn a_group_change_names_who_added_who_removed_and_who_left() { + let world = World::linked(); + world.connected(); + world.steer("group-left alan grace"); + world.system_line(CLUB, "Grace Ombra removed Alan Ferro from the group"); + // In again by himself, through the link. + world.steer("group-join alan self"); + world.system_line(CLUB, "Alan Ferro joined the group using the group link"); + // This account is removed, which makes the row read-only, and added back. + world.steer("group-left me grace"); + world.system_line(CLUB, "Grace Ombra removed you from the group"); + world.until("read-only after being removed", || world.conversation(CLUB)?.read_only.then_some(())); + assert_eq!(world.conversation(CLUB).unwrap().read_only_reason, "You are no longer in this group"); + world.steer("group-join me grace"); + world.system_line(CLUB, "Grace Ombra added you to the group"); + world.until("writable after being added back", || (!world.conversation(CLUB)?.read_only).then_some(())); + // Left by themselves, and in again by taking an invitation (`group-pending` is silent) + // rather than through the link. + world.steer("group-left alan self"); + world.system_line(CLUB, "Alan Ferro left the group"); + world.steer(&format!("group-pending {ALAN} Alan Ferro")); + world.steer("group-join alan self"); + world.system_line(CLUB, "Alan Ferro joined the group"); + + // What the adapter knows of the group followed: once everyone else is gone, its only admin + // is not asked to choose a new admin first. + world.steer("group-role me admin"); + world.steer("group-left alan"); + world.steer("group-left grace self"); + world.system_line(CLUB, "Grace Ombra left the group"); + world.until("leaving is allowed once everyone else is gone", || { + (world.ask(Request::Leave { conversation: key(CLUB), silent: false }) == Response::Ok).then_some(()) + }); + world.heard(&format!("leave-group {}", CLUB.strip_prefix("g.").unwrap())); } /// The sentence for a rename, a join, and leaving. The connect snapshot is not a sentence. @@ -1196,7 +1257,7 @@ fn a_group_delta_names_the_rename_the_join_and_the_leave() { let mut members = before.members.clone(); members.push(chatd::adapters::signal::MemberSnap { id: GRACE.into(), admin: false }); let after = chatd::adapters::signal::GroupSnap { members, ..chatd::adapters::signal::GroupSnap::default() }; - let joined = chatd::adapters::signal::group_delta(&before, &after, ME, |id| if id == GRACE { "Grace Ombra".into() } else { String::new() }); + let joined = chatd::adapters::signal::group_delta(&before, &after, ME, "", |id| if id == GRACE { "Grace Ombra".into() } else { String::new() }); assert_eq!(joined.lines, ["Grace Ombra joined the group"]); assert!(!joined.left); } diff --git a/e2e/scenarios/signal-group-change-lines/drive.linux.sh b/e2e/scenarios/signal-group-change-lines/drive.linux.sh new file mode 100644 index 00000000..c12da6a4 --- /dev/null +++ b/e2e/scenarios/signal-group-change-lines/drive.linux.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# signal-group-change-lines on Linux. The lab runs this with bash while ffmpeg films the display. +set -u +HERE=$(cd "$(dirname "$0")" && pwd) +if command -v python3 >/dev/null 2>&1; then + exec python3 "$HERE/drive.py" +fi +echo "python3 is not on PATH" >&2 +exit 1 diff --git a/e2e/scenarios/signal-group-change-lines/drive.macos.sh b/e2e/scenarios/signal-group-change-lines/drive.macos.sh new file mode 100644 index 00000000..c9b553fb --- /dev/null +++ b/e2e/scenarios/signal-group-change-lines/drive.macos.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# signal-group-change-lines on macOS. The lab runs this with bash while the display is filmed. +set -u +HERE=$(cd "$(dirname "$0")" && pwd) +if command -v python3 >/dev/null 2>&1; then + exec python3 "$HERE/drive.py" +fi +echo "python3 is not on PATH" >&2 +exit 1 diff --git a/e2e/scenarios/signal-group-change-lines/drive.py b/e2e/scenarios/signal-group-change-lines/drive.py new file mode 100644 index 00000000..e29cb601 --- /dev/null +++ b/e2e/scenarios/signal-group-change-lines/drive.py @@ -0,0 +1,295 @@ +#!/usr/bin/env python3 +"""A Signal group change says who did what, and a group this account is out of says so. + +Starts this build's chatd with the scripted Signal wire (TINYCLIENT_SIGNAL_FAKE), steers it +over its control file the way tests/signal.rs does, and speaks chatd's real socket. Every line +and every row is read back from the store. Out of the group, the row is read-only and says +"You are no longer in this group"; a rename, and a later snapshot of the group, keep that; being +added back clears it. A change then says who removed someone, who added them, who got in through +the link, and who left by themselves. Last, the stored group is told with every change: once +everyone else has left, the only admin left is allowed to leave. A build from before the fix +leaves the reason empty, writes none of those lines, and still refuses the leave, so this driver +fails there. + +Env from the lab: E2E_OUT, E2E_T0, E2E_APP_DIR. +""" + +import json +import os +import socket +import struct +import subprocess +import sys +import time + +OUT = os.environ.get("E2E_OUT", "") +T0 = float(os.environ.get("E2E_T0") or time.time()) +APP = os.environ.get("E2E_APP_DIR", "") + +ME = "a1a1a1a1-0000-4000-8000-000000000001" +SESSION = json.dumps({"aci": ME, "name": "Ada Quill", "vault": "00"}) +GROUP = "g.5a175a175a175a175a175a175a175a175a175a175a175a175a175a175a175a17" +OUT_OF = "You are no longer in this group" + +FAILED = False +STEPS = "" + + +def now(): + return time.time() - T0 + + +def step(words, ok): + global FAILED + if not ok: + FAILED = True + line = '{"t": %s, "step": "%s", "ok": %s}' % (round(now(), 1), words.replace('"', "'"), "true" if ok else "false") + print(("[ok] " if ok else "[FAILED] ") + words, flush=True) + if STEPS: + with open(STEPS, "a", encoding="utf-8") as handle: + handle.write(line + "\n") + + +def app_bin(app_dir): + name = "chatd.exe" if sys.platform == "win32" else "chatd" + if sys.platform == "darwin" and app_dir.endswith(".app"): + return os.path.join(app_dir, "Contents", "MacOS", "chatd") + return os.path.join(app_dir, name) + + +def connect(sock_path): + """chatd's socket: a file on Unix, the matching named pipe on Windows.""" + if sys.platform == "win32": + return open("\\\\.\\pipe\\" + sock_path, "r+b", buffering=0) + stream = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + stream.settimeout(5) + stream.connect(sock_path) + return stream + + +def write_all(stream, data): + view = memoryview(data) + while view: + written = stream.write(view) + if not written: + raise RuntimeError("chatd's socket took nothing") + view = view[written:] + + +class Chat: + def __init__(self, sock_path): + self.stream = connect(sock_path) + + def ask(self, request): + body = json.dumps(request, separators=(",", ":")).encode() + write_all(self.stream, struct.pack("!I", len(body)) + body) + head = b"" + while len(head) < 4: + got = self.stream.read(4 - len(head)) + if not got: + raise RuntimeError("chatd closed its socket") + head += got + length = struct.unpack("!I", head)[0] + if length > 1024 * 1024: + raise RuntimeError("answer exceeds the protocol size limit") + chunks = b"" + while len(chunks) < length: + got = self.stream.read(length - len(chunks)) + if not got: + raise RuntimeError("chatd closed its socket mid-frame") + chunks += got + return json.loads(chunks) + + def close(self): + try: + self.stream.close() + except OSError: + pass + + +def main(): + global STEPS + if not OUT or not APP: + print("E2E_OUT and E2E_APP_DIR are required", file=sys.stderr) + return 1 + os.makedirs(OUT, exist_ok=True) + STEPS = os.path.join(OUT, "steps.jsonl") + open(STEPS, "w", encoding="utf-8").close() + binary = app_bin(APP) + if not os.path.isfile(binary): + step("chatd is in E2E_APP_DIR", False) + return 1 + + data = os.path.join(OUT, "data") + os.makedirs(data, exist_ok=True) + sock_path = os.path.join(data, "chat.sock") + control = os.path.join(data, "signal.ctl") + open(control, "a", encoding="utf-8").close() + env = os.environ.copy() + env["TINYCLIENT_DIR"] = data + env["TINYCLIENT_SIGNAL_FAKE"] = "1" + env["TINYCLIENT_SESSION_SIGNAL"] = SESSION + env.pop("TINYCLIENT_SESSION_DISCORD", None) + env.pop("TINYCLIENT_SESSION_SLACK", None) + env.pop("TINYCLIENT_SESSION_TELEGRAM", None) + env.pop("TINYCLIENT_SESSION_TEAMS", None) + kwargs = {"cwd": data, "env": env, "stdin": subprocess.DEVNULL} + if sys.platform == "win32": + kwargs["creationflags"] = 0x08000000 + with open(os.path.join(OUT, "chatd.out.log"), "w", encoding="utf-8") as out, open(os.path.join(OUT, "chatd.err.log"), "w", encoding="utf-8") as err: + kwargs["stdout"] = out + kwargs["stderr"] = err + proc = subprocess.Popen([binary], **kwargs) + chat = None + try: + deadline = time.time() + 15 + while chat is None: + if proc.poll() is not None: + step("chatd stays up for the driver", False) + return 1 + if time.time() > deadline: + step("chatd opens its socket", False) + return 1 + try: + chat = Chat(sock_path) + except OSError: + time.sleep(0.1) + drive(chat, control) + finally: + if chat: + chat.close() + proc.kill() + try: + proc.wait(timeout=5) + except subprocess.TimeoutExpired: + pass + return 1 if FAILED else 0 + + +def key(id): + return {"network": "signal", "account": ME, "id": id} + + +def wait(what, chat, look, seconds=20): + deadline = time.time() + seconds + while time.time() < deadline: + found = look() + if found is not None: + step(what, True) + return found + time.sleep(0.2) + step(what, False) + return None + + +def steer(control, line): + with open(control, "a", encoding="utf-8") as handle: + handle.write(line + "\n") + + +def ask(chat, request): + try: + return chat.ask(request) + except Exception: + return None + + +def conversation(chat, id): + answer = ask(chat, {"op": "conversation", "conversation": key(id)}) + return (answer or {}).get("conversation") + + +def messages(chat, id): + answer = ask(chat, {"op": "messages", "conversation": key(id), "page": "newest", "limit": 100}) + return (answer or {}).get("messages", []) + + +def read_only(chat): + row = conversation(chat, GROUP) + return row if row and row.get("read_only") else None + + +def writable(chat): + row = conversation(chat, GROUP) + return row if row and not row.get("read_only") else None + + +def titled(chat, title): + row = conversation(chat, GROUP) + return row if row and row.get("title") == title else None + + +def system_line(chat, text): + """A line read back from the store through chatd's socket, as the shell gets it.""" + return next((m for m in messages(chat, GROUP) if m.get("text") == text), None) + + +def change(chat, control, script, text): + """One scripted change, then the line the store keeps for it. Every text comes once.""" + steer(control, script) + line = wait("the store has the line " + repr(text), chat, lambda: system_line(chat, text), 10) + if line is not None: + step("that line is a system row", line.get("kind") == {"kind": "system"}) + + +def left(chat): + """Asks once to leave the group: the answer once chatd has done it, else None.""" + answer = ask(chat, {"op": "leave", "conversation": key(GROUP), "silent": False}) + return answer if answer and answer.get("op") == "ok" else None + + +def drive(chat, control): + status = wait("chatd answers its status", chat, lambda: ask(chat, {"op": "status"})) + if status is None: + return + wait("Signal is connected", chat, lambda: (any(a["link"] == "connected" for a in ask(chat, {"op": "status"})["accounts"]) or None)) + wait("the fake's group is known", chat, lambda: conversation(chat, GROUP) and True) + + # Out of the group: the row is read-only and says why. + steer(control, "group-leave") + out = wait("the group is read-only after leaving", chat, lambda: read_only(chat)) + if out is not None: + step("the row says why it is read-only", out.get("read_only_reason") == OUT_OF) + + # A rename while out of the group keeps both. + steer(control, "group-title Thursday club") + renamed = wait("the row is renamed while out of the group", chat, lambda: titled(chat, "Thursday club")) + if renamed is not None: + step("a rename keeps the row read-only, with its reason", renamed.get("read_only") is True and renamed.get("read_only_reason") == OUT_OF) + + # So does a later snapshot of the group, which every change tells. This one changes nothing. + steer(control, "group-access attributes=member") + time.sleep(1.0) + kept = conversation(chat, GROUP) or {} + step("a later snapshot keeps the reason", kept.get("read_only") is True and kept.get("read_only_reason") == OUT_OF) + + # Being added back clears both. + steer(control, "group-rejoin") + back = wait("the group can be written to again", chat, lambda: writable(chat)) + if back is not None: + step("being added back clears the reason", back.get("read_only_reason") == "") + + # Who did what: removed and added by Grace, gone with nobody named, in through the link. + change(chat, control, "group-left alan grace", "Grace Ombra removed Alan Ferro from the group") + change(chat, control, "group-join alan grace", "Grace Ombra added Alan Ferro to the group") + change(chat, control, "group-left alan", "Alan Ferro is no longer in the group") + change(chat, control, "group-join alan self", "Alan Ferro joined the group using the group link") + + # This account removed: one line, and the row says it again. Added back: writable once more. + change(chat, control, "group-left me grace", "Grace Ombra removed you from the group") + out = wait("the group is read-only after being removed", chat, lambda: read_only(chat)) + if out is not None: + step("the row says why after being removed", out.get("read_only_reason") == OUT_OF) + change(chat, control, "group-join me grace", "Grace Ombra added you to the group") + wait("the group can be written to again after being added back", chat, lambda: writable(chat)) + + # The stored group is told with every change, so what chatd knows of the group followed: + # once everyone else has left, its only admin is allowed to leave. + steer(control, "group-role me admin") + change(chat, control, "group-left alan self", "Alan Ferro left the group") + change(chat, control, "group-left grace self", "Grace Ombra left the group") + wait("the group can be left once everyone else is gone", chat, lambda: left(chat)) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/e2e/scenarios/signal-group-change-lines/drive.windows.ps1 b/e2e/scenarios/signal-group-change-lines/drive.windows.ps1 new file mode 100644 index 00000000..9384775f --- /dev/null +++ b/e2e/scenarios/signal-group-change-lines/drive.windows.ps1 @@ -0,0 +1,17 @@ +# signal-group-change-lines on Windows. The lab runs this in the console session it is already filming. +$ErrorActionPreference = 'Stop' +$drive = Join-Path $PSScriptRoot 'drive.py' +if (Get-Command py -ErrorAction SilentlyContinue) { + & py -3 $drive + exit $LASTEXITCODE +} +if (Get-Command python -ErrorAction SilentlyContinue) { + & python $drive + exit $LASTEXITCODE +} +if (Get-Command python3 -ErrorAction SilentlyContinue) { + & python3 $drive + exit $LASTEXITCODE +} +Write-Host 'python is not on PATH (tried py -3, python, python3)' +exit 1 diff --git a/e2e/scenarios/signal-group-change-lines/scenario.json b/e2e/scenarios/signal-group-change-lines/scenario.json new file mode 100644 index 00000000..7009483f --- /dev/null +++ b/e2e/scenarios/signal-group-change-lines/scenario.json @@ -0,0 +1,12 @@ +{ + "id": "signal-group-change-lines", + "title": "A Signal group change says who did what, and a group this account is out of says so", + "platforms": ["windows", "macos", "linux"], + "not_applicable": { + "android": "The phone proof build does not run desktop chatd. The lines and the read-only reason are the desktop adapter's and its store's.", + "ios": "The phone proof build does not run desktop chatd. The lines and the read-only reason are the desktop adapter's and its store's." + }, + "needs": [], + "release": false, + "max_still_seconds": 60 +}