If the host of a space has a private account, there's no Discord webhook sent for whatever reason but also the file(s) don't get properly organized. I tested it by hosting a space with a private account, and using the auth of my other account that follows it.
I think we should modify SpaceUtil's functions to mitigate a protected account such as by adding a check to SpaceUtil#getHostUsername and other relevant functions. Despite create_results being unavailable we could utilize audiospace.participants.admins[0] instead as from my gathering that is always the host. Even though the account is protected, we can pull relevant data such as user and display names as well as the user's id and avatar (src/interfaces/Twitter.interface.ts#L69).
By using this information and adding checks, we could derive the appropriate information and be able to send the webhook with no problem as well as organizing the files accordingly.
I can help work on this but I will be busy until the next 12 hours or so.
If the host of a space has a private account, there's no Discord webhook sent for whatever reason but also the file(s) don't get properly organized. I tested it by hosting a space with a private account, and using the auth of my other account that follows it.
https://github.com/HitomaruKonpaku/twspace-crawler/blob/430247d89b18d92bada17a56180ec64ec3727970/src/modules/SpaceWatcher.ts#L63 calls https://github.com/HitomaruKonpaku/twspace-crawler/blob/430247d89b18d92bada17a56180ec64ec3727970/src/utils/SpaceUtil.ts#L22
but for protected accounts the value of
creator_results
isI think we should modify SpaceUtil's functions to mitigate a protected account such as by adding a check to SpaceUtil#getHostUsername and other relevant functions. Despite
create_results
being unavailable we could utilizeaudiospace.participants.admins[0]
instead as from my gathering that is always the host. Even though the account is protected, we can pull relevant data such as user and display names as well as the user's id and avatar (src/interfaces/Twitter.interface.ts#L69).By using this information and adding checks, we could derive the appropriate information and be able to send the webhook with no problem as well as organizing the files accordingly.
I can help work on this but I will be busy until the next 12 hours or so.