Fix: family-member accounts get empty device list - #63
Open
jjkk52 wants to merge 1 commit into
Open
Conversation
Use /v2/homeroom/gethome with fetch_share/fetch_share_dev and merge share_home_list into home_list, so shared homes and their devices are visible. device_list now collects dids from all (own + shared) homes and queries /v2/home/device_list_page with explicit dids, which also returns shared/family-member devices that the old /home/device_list misses. FixesYonsm#62
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 freeto 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.
Fixes#62
Family-member accounts (非管理员) got an empty device list from
device_list()even thoughhome_list()returned homes/rooms correctly. The old/home/device_listendpoint only returns the account's own devices, so shared-home devices were invisible.Changes:
home_list(): call/v2/homeroom/gethomewithfetch_share/fetch_share_devand mergehomelist+share_home_list, so shared homes (and their rooms/devices) are returned.device_list(): collect dids from all own + shared homes via the new_home_dids(), then query/v2/home/device_list_pagewith explicitdids(batched), which returns shared/family-member devices; falls back to the old endpoint when no homes are found.Verified against a family-member account: 77 devices in the shared home are now listed identically to the admin account (same split/sub-device handling).