Regression tests: a file sent into a room goes to the room's chat #2

Merged
fmodf merged 2 commits from fix/room-file-send into master 2026-10-19 20:36:33 +00:00
Owner

Report: sending a file into a group made a phantom contact with the group's address and sent the file there.

Already fixed in bd4a3d5 ("call fixes"): files and voice notes now go to the room's chat (room@service?join), as text does. libtacky tells a group send from a 1:1 one by that suffix alone, so a bare room JID was a private message to the room and a new 1:1 chat in the list. The build that showed the bug predates that commit.

This PR adds regression tests only (AnotherIMTests/AttachmentRoomSendTests.swift):

  • a picked file and a voice note in a room ask for the upload slot and send with chat = room@service?join, unchanged;
  • a failed upload is listed under the room's chat, not its bare JID.

Not covered: ChatViewModel's half (AppEnvironment.makeForTesting builds no attachment service).

A phantom chat already in someone's list stays until deleted.

Tested: gmake test on the iPhone 18 Pro simulator (iOS 27.0): 362 tests, 0 failures (359 on master). SwiftLint: nothing on the file.

🤖 Generated with Claude Code

Report: sending a file into a group made a phantom contact with the group's address and sent the file there. **Already fixed** in `bd4a3d5` ("call fixes"): files and voice notes now go to the room's chat (`room@service?join`), as text does. libtacky tells a group send from a 1:1 one by that suffix alone, so a bare room JID was a private message to the room and a new 1:1 chat in the list. The build that showed the bug predates that commit. This PR adds regression tests only (`AnotherIMTests/AttachmentRoomSendTests.swift`): - a picked file and a voice note in a room ask for the upload slot and send with `chat` = `room@service?join`, unchanged; - a failed upload is listed under the room's chat, not its bare JID. Not covered: `ChatViewModel`'s half (`AppEnvironment.makeForTesting` builds no attachment service). A phantom chat already in someone's list stays until deleted. **Tested:** `gmake test` on the iPhone 18 Pro simulator (iOS 27.0): 362 tests, 0 failures (359 on master). SwiftLint: nothing on the file. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fmodf merged commit 7da371fbfe into master 2026-10-19 20:36:33 +00:00
fmodf deleted branch fix/room-file-send 2026-10-19 20:36:33 +00:00
Sign in to join this conversation.
No reviewers
No labels
done
fixed
returned
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
another-im/anotherim-swift!2
No description provided.