Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protected accounts saving/organization and missing webhook #34

Open
Infinitay opened this issue Oct 5, 2022 · 1 comment
Open

Protected accounts saving/organization and missing webhook #34

Infinitay opened this issue Oct 5, 2022 · 1 comment

Comments

@Infinitay
Copy link

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.

image

public get userScreenName(): string {

calls
return audioSpace?.metadata?.creator_results?.result?.legacy?.screen_name

but for protected accounts the value of creator_results is

"creator_results": {
  "result": {
    "__typename": "UserUnavailable",
    "reason": "Protected"
  }
}

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.

@HitomaruKonpaku
Copy link
Owner

Oh yea rarely got this issue.

I plan to rewrite this sometime soon to support other issue (like detect and notify ended Space)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants