Skip to content

refactor(room): Split two-arg setActiveSince() into single-arg setters#17811

Open
miaulalala wants to merge 3 commits intomainfrom
refactor/noid/room-setActiveSince-single-arg
Open

refactor(room): Split two-arg setActiveSince() into single-arg setters#17811
miaulalala wants to merge 3 commits intomainfrom
refactor/noid/room-setActiveSince-single-arg

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

Part of the incremental migration of Room to extend OCP\AppFramework\Db\Entity (Phase 1d).

Room::setActiveSince(\DateTime $since, int $callFlag) combined two concerns β€” conditionally setting the active-since timestamp and bitwise-ORing the call flag β€” in a single two-argument method. Entity's magic __call() requires standard single-argument setters.

  • Replace with setActiveSince(?\DateTime $activeSince) and setCallFlag(int $callFlag)
  • Move the conditional/bitwise logic into RoomService::setActiveSince(), where it already lived conceptually

AI-Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

πŸ› οΈ API Checklist

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • πŸ“˜ API documentation in docs/ has been updated or is not required
  • πŸ”– Capability is added or not needed

Part of the incremental migration of `Room` to extend
`OCP\AppFramework\Db\Entity` (Phase 1d).

`Room::setActiveSince(\DateTime $since, int $callFlag)` combined two
concerns β€” conditionally setting the active-since timestamp and
bitwise-ORing the call flag β€” in a single two-argument method.
Entity's magic `__call()` requires standard single-argument setters.

- Replace with `setActiveSince(?\DateTime $activeSince)` and `setCallFlag(int $callFlag)`
- Move the conditional/bitwise logic into `RoomService::setActiveSince()`,
  where it already lived conceptually

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
…h call

Verifies that the bitwise OR previously in Room::setActiveSince() is
preserved after moving it to the service layer.

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: api πŸ› οΈ OCS API for conversations, chats and participants feature: conversations πŸ‘₯

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants