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

Required object stories.SendStory of undefined is undefined #635

Open
icanary opened this issue Feb 2, 2024 · 1 comment
Open

Required object stories.SendStory of undefined is undefined #635

icanary opened this issue Feb 2, 2024 · 1 comment

Comments

@icanary
Copy link

icanary commented Feb 2, 2024

Hi, i'm trying to send story to my premium account, but getting error.
This is my code:

work and return true:
const result = await client.invoke(new Api.stories.CanSendStory({ peer: 'me' }));

work and get my stories:
const stories = await client.invoke(new Api.stories.GetPeerStories({ peer: 'me' }));

not work and get error "Required object stories.SendStory of undefined is undefined":
const story = await client.invoke(new Api.stories.SendStory({ peer: 'me', media: new Api.InputMediaUploadedPhoto({ file: uploaded_file, ttlSeconds: 43 }), privacyRules: [Api.InputPrivacyValueAllowAll] }));

Why? What i'm doing wrong?

Thank you!

@icanary
Copy link
Author

icanary commented Feb 3, 2024

that's the fix!

privacyRules: [new Api.InputPrivacyValueAllowAll(undefined)]

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

1 participant