Skip to content

Conversation

@miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Dec 9, 2025

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • Send due scheduling messages via background job

Checklist:

  • if error, set Participant::hasScheduledMessages to -1 (migrate to int)
  • keep pending scheduled messages if room is locked, chat permission revoked, or lobby enabled and no permission.
  • add send_at to metadata, and set regular send_at to 0 if error
  • show warning for jobs outside the 5 minute intervals (no guarantee that it can be sent exactly then)
  • lobby enabled: permissions check - permission_ignore_lobby (API and BG job)
  • Repair Actor::hasScheduledMessage error state when faulty message was updated or deleted

🧪 Test Cases

  • POST to room that participant has been removed from
  • DELETE message that is not mine / modify message that is not mine
  • set sendAt timestamp to in the past
  • set message text to empty string
  • participant is GUEST/SELF_JOINED
  • Reply to system messages should be blocked
  • Send message with no parent or thread
  • Send message with parent
  • Send reply to a thread that exists
  • Create thread via scheduling
  • Mention a user / team / group in message
  • Mention in thread
  • Deleted parent / replyTo
  • Deleted parent / replyTo in a thread
  • send message to room where chat permission was removed
  • Send message to a room which was locked
  • Send message to a room that was converted to former one to one
  • Message has a create thread identifier but no thread title
  • Mentioned user in message body that is not (no longer) part of chat
  • Reply to system messages should be blocked

🏁 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

@miaulalala miaulalala mentioned this pull request Dec 9, 2025
14 tasks
@miaulalala miaulalala self-assigned this Dec 9, 2025
@miaulalala miaulalala added this to the 🍏 Next Major (33) milestone Dec 9, 2025
@miaulalala miaulalala force-pushed the feat/3954/scheduled-messages-sending-job branch from ce945d0 to 4c83af5 Compare December 10, 2025 10:50
@nickvergessen nickvergessen added the feature: api 🛠️ OCS API for conversations, chats and participants label Dec 10, 2025
@miaulalala miaulalala force-pushed the feat/3954/scheduled-messages-sending-job branch from 2db4092 to 621b41e Compare December 15, 2025 11:22
}

public function deleteById(Room $chat, int $id, string $actorType, string $actorId): int {
public function deleteById(Room $chat, string $id, string $actorType, string $actorId): int {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it string or int in PHP now, I thought it's int?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm as confused as you are, I thought it needs to be a string fo 32 bit?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per my understanding that is only for JSON/JS etc.
So in out going response objects.

For anything else it can be an int as far as I understood?

@miaulalala miaulalala force-pushed the feat/3954/scheduled-messages-sending-job branch 2 times, most recently from 883c2bc to 9f797af Compare December 18, 2025 14:50
@miaulalala miaulalala marked this pull request as ready for review December 18, 2025 14:51
miaulalala added a commit that referenced this pull request Dec 18, 2025
- [ ] needs nextcloud/server#56795
- [ ] needs #16508

Skipping CI for now, amend the commit message and remove the skip-ci param when ready to rebase and merge

[skip-ci]

Signed-off-by: Anna Larch <[email protected]>
miaulalala added a commit that referenced this pull request Dec 18, 2025
- [ ] needs nextcloud/server#56795
- [ ] needs #16508

Skipping CI for now, amend the commit message and remove the skip-ci param when ready to rebase and merge

[skip ci]

Signed-off-by: Anna Larch <[email protected]>
@nickvergessen nickvergessen force-pushed the feat/3954/scheduled-messages-sending-job branch from 48b20dd to f757d59 Compare December 19, 2025 11:03
Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen force-pushed the feat/3954/scheduled-messages-sending-job branch from 21a2e23 to 080b0fc Compare December 19, 2025 12:59
@nickvergessen nickvergessen merged commit 81bc56e into main Dec 19, 2025
81 checks passed
@nickvergessen nickvergessen deleted the feat/3954/scheduled-messages-sending-job branch December 19, 2025 13:14
@Antreesy
Copy link
Contributor

For failed messages, original sendAt is not exposed in the server response?

image

CarlSchwan pushed a commit that referenced this pull request Jan 7, 2026
- [ ] needs nextcloud/server#56795
- [x] needs #16508

Skipping CI for now, amend the commit message and remove the skip-ci param when ready to rebase and merge

[skip ci]

Signed-off-by: Anna Larch <[email protected]>
Signed-off-by: Carl Schwan <[email protected]>
CarlSchwan pushed a commit that referenced this pull request Jan 7, 2026
- [x] needs nextcloud/server#56795
- [x] needs #16508

Signed-off-by: Anna Larch <[email protected]>
Signed-off-by: Carl Schwan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: chat 💬 Chat and system messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants