feat(search-history): add sharing functionality for saved searches, database schema#208
Open
sreeshanth-soma wants to merge 1 commit intoopenbroadcaster:5.5-developfrom
Open
Conversation
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.
Closes: #103
Summary
Implements Shared Saved Searches so users can share saved advanced searches with specific users or permission groups.
Recipients see shared searches under a new Shared With Me section and can execute them directly from Search History.
Problem
Issue #103 requested a way to share saved searches from the Search History/My Searches UI so other users (or group members) can reuse them.
Previously, searches were private to each user (
saved/history) with no sharing mechanism.Changes
Backend —
core/models/media_model.phpAdded sharing model support:
search_share():savedtypesearch_unshare()search_get_shared():shared_by_nameattribution[]when no shared rows existsearch_get_shared_recipients()helperBackend —
core/controllers/media.phpAdded/updated API endpoints:
media_my_searches()now returns:savedhistorysharedmedia_my_searches_share()endpoint (POST /v2/media/searches/share)media_my_searches_unshare()endpoint (DELETE /v2/media/searches/share/:id)Database —
core/updates/20260219.phpAdded migration to create
media_searches_sharedtable with:search_idshared_byshared_with_user_idshared_with_group_idNote:
shared_with_group_iduses unsigned int to matchusers_groups.idtype.Frontend —
public/html/sidebar/my_searches.htmlFrontend —
public/html/sidebar/share_search.htmlNew modal UI:
Frontend —
public/js/sidebar.jsAdded/updated sidebar behavior:
mySearchesShareWindow()andmySearchesShareSubmit()Shared by: <name>) with improved visual separationVerification Steps
The Result: