Closed harshadwaj closed 2 years ago
Hello! And how does this iOS shortcut send messages? From which user do they sent? Can you post here its code? Or, maybe, you could create test group with this messages and invite me @shady2k to this group and I've inspect this messages.
I created iOS shortcut to send message to a telegram group instead of opening the app. The shortcut uses the telegram POST API.
The format is: https://api.telegram.org/bot<bot-token>/sendMessage
as url and body containing two form fields - chat_id
and text
.
The token used is of the bot and it appears ok in the group as sent by bot. Logseq does not pull these messages.
You should try:
That is the setting that I have already done to make the bot work as per the instructions. Verified again and its DISABLED. Still no messages from bot only. From user works fine.
Ok, let's try:
https://api.telegram.org/bot${botToken}/getUpdates
in your browser, where ${botToken}
is you bot tokenI did some more testing and figured out that it is the constraint of the Telegram API and it has nothing to do with your plugin. In summary, bots cannot read messages from other bots.
However, I am not sure how and why it works in Telegroam. Maybe because of the proxy server?
I'm not sure. Probably proxy used for work with files from Telegram. Can you do that I was asked you before?
I did and the getUpdates
does not fetch messages posted through Shortcut (which is using bot). Returns an empty array as result: [ ]
. The reason for that is the official docs link I have posted.
I have no idea what do with this. I were inspected the code of telegroam, it uses same way to fetch messages from Telegram.
I had to refer to my notes to figure out what I had done to make it work. Telegroam also does not handle this by default. I had updated its code. Here is the summary of what I had done, so that you can update your code to make it work:
channel_post
to the list. You have to do something similar to process messages from a channel.getUpdates
APIThis worked in Telegroam and also will work in your plugin because the above restriction I mentioned that bots cannot read bots does not apply to channel messages.
I did these steps again now and I am able to verify the messages from getUpdates
API.
Can you check with new version?
Works perfect now. Getting messages from channel pushed through Shortcut. A minor annoyance (not related to this) is that messages gets added next to the first block in the journal but not at the end of all the blocks.
Otherwise, its working perfectly fine. Thanks for such a quick update.
Messages from users comes fine but not from those sent from bots.
Example usage - I have setup an iOS shortcut to send message to a telegram group using the api. Those are not delivered to Logseq even though I can see them appear in the group.
Also, the "authorizesUsers":[] is empty to allow message from all users.