Skip to content

[Bug]: OpenLink, OpenTelegramLink, shareURL, setEmojiStatus dont work even though .isAvailable() shows true for all of them #743

@brex684

Description

@brex684

Telegram Application

Telegram for Android, Telegram for iOS, Telegram Web K, Telegram Web A, Telegram Desktop, Telegram for macOS

Describe the Bug

I have initialized react-sdk with init and mounted backbutton to make sure it worked

import { createRoot } from 'react-dom/client';
import './index.scss';
import App from './App.tsx';

import { init, backButton } from '@telegram-apps/sdk-react';

init();

backButton.mount();

createRoot(document.getElementById('root')!).render(<App />);

But still, pretty much all telegram methods like opening links, setting status, opening beometry dont work, even though im checking isAvailable() for all of them and it shows true. Im not getting any errors, these methods just dont work

Examples of calling:

onClick: async () => {
    await setEmojiStatus('5361800828313167608');
}
onClick: () => {
    openTelegramLink(`https://t.me/nft/${gift.slug}`);
},

To Reproduce

  1. Create react app with vite + typescript
  2. Install @telegram-apps/sdk-react ^3.3.1
  3. Init it with init()
  4. Try to call methods I described earlier

Expected Behavior

Well, each method should do what it supposed to do

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions