Repository navigation
Open the next active conversation after deleting, per the after-send setting - #5693
Merged
freescout-help-desk merged 1 commit intoOct 2, 2026
Conversation
…setting After deleting a conversation FreeScout always returns to the folder. When the user's after-send setting is "Next active conversation", open the next active conversation instead, as changing the status already does. Other settings keep returning to the folder. The next conversation is found before the delete, while the conversation is still in its folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #5683.
Problem
After deleting a conversation, FreeScout always returns to the folder list. Working through a backlog of emails means deleting one, then picking the next one from the list, every time.
The "after send" setting already covers this for other actions. Its help text says:
So with "Next active conversation" selected, changing the status opens the next conversation, but deleting does not. Delete is currently the one action that ignores the setting.
Fix
delete_conversationanddelete_conversation_foreverget their redirect from a newgetRedirectUrlAfterDelete():It uses the same
urlNext(..., STATUS_ACTIVE, true)call asgetRedirectUrl(), so "next" means the same as after a status change: the next active conversation in the folder being viewed, or the previous one if it was the last, or the folder if none is left.It is called before the delete. After
deleteToFolder()the conversation is in Deleted, and "next" would be worked out from the wrong folder.Not changed
after_send(themailbox_usermigration), so this changes what most users see after a delete. That seemed right, since it is what the setting describes, but I wanted to say it plainly.Tested
On
masterat 2f1739e, with "Next active conversation" set, deleting from Unassigned opened the next conversation (/conversation/<next>?folder_id=1). Without this change the same steps land on/mailbox/1/1. Both delete and delete forever go through the same method.Files
app/Http/Controllers/ConversationsController.php:delete_conversation,delete_conversation_forever, newgetRedirectUrlAfterDelete()