phen0menon / poe-trade-telegram-notifier

📱 Receive Telegram notifications about trade offers and reply to them!
Other
9 stars 1 forks source link

Reply not working #3

Closed MR-P4NDA closed 2 days ago

MR-P4NDA commented 1 week ago

Love the program! Works really well but can't get the reply to work properly. Anytime I reply within Telegram (right-click -> reply), nothing comes through into POE. Have you experienced this?

MR-P4NDA commented 1 week ago

Been trying to debug and I think the issue is from the "async def run_telegram_reply_observer(app_config: AppConfig, last_read_message_offset: int = None) -> None" function within main.py. It seems like it's not reading the telegram messages, nor is the message making it to the clipboard so it can be pasted into the client chat. I had a friend test and they have the same issue, they're unable to reply but the whisper notifications are working properly. I'm using the default client and he was using Steam

phen0menon commented 1 week ago

Thanks for detailed info, will take a look a bit later!

I need some more details - what OS you use, what Telegram Client you use (official one or some port?), do you have any other clipboard app running?

MR-P4NDA commented 1 week ago

I'm using Windows 11 for my OS and I'm using the official Telegram desktop client. No other clipboard software has been enabled or being used while running the program in PyCharm.

I can take some screenshot if you want how my config.ini file is configured, the requirements.txt is laid out or any other details you want!

MR-P4NDA commented 6 days ago

Randomly started to copy/paste into the client today, but the terminal spit out a few errors

2024-07-02 17:06:57 ERROR run_telegram_reply_observer: generic error - (0, 'SetForegroundWindow', 'No error message is available'); continuing loop execution 2024-07-02 17:06:58 ERROR run_telegram_reply_observer: generic error - (0, 'SetForegroundWindow', 'No error message is available'); continuing loop execution 2024-07-02 17:06:59 ERROR run_telegram_reply_observer: generic error - (0, 'SetForegroundWindow', 'No error message is available'); continuing loop execution 2024-07-02 17:06:59 ERROR run_telegram_reply_observer: generic error - (0, 'SetForegroundWindow', 'No error message is available'); continuing loop execution

phen0menon commented 6 days ago

Not sure if config.ini would help, however what Python version are you using?

MR-P4NDA commented 6 days ago

I'm using 3.8, I thought about dating it to the latest to see if that makes a difference

On Wed, Jul 3, 2024, 9:04 AM Roland Ibragimov @.***> wrote:

Not sure if config.ini would help, however what Python version are you using?

— Reply to this email directly, view it on GitHub https://github.com/phen0menon/poe-trade-telegram-notifier/issues/3#issuecomment-2206187147, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJRZVQTBAU6UBQXDA642ETTZKQAFRAVCNFSM6AAAAABKE2RDS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBWGE4DOMJUG4 . You are receiving this because you authored the thread.Message ID: @.***>

Edit: I did test with Python 3.12 but the same issue was present. I could get notifications, but replies weren't going through

phen0menon commented 5 days ago

I finally reproduced the issue. It looks like an internal problem: SetForegroundWindow does not work correctly in some cases (https://github.com/pywinauto/pywinauto/issues/270)

Looking for an alternative solution...

phen0menon commented 5 days ago

As a workaround you can just keep your window opened (focused).

Also you can try using Windowed mode, not sure if it helps but I expect that it does.

MR-P4NDA commented 5 days ago

I do play in Windowed Fullscreen, and I switched to just Windowed. Still receive the issue with replies. I did keep the window focused and also tried the reply from my phone, to ensure the window remained focused

phen0menon commented 5 days ago

You do see 0, 'SetForegroundWindow', 'No error message is available') line in the logs, right?

MR-P4NDA commented 5 days ago

yeah, I see it in the output logs

phen0menon commented 4 days ago

Hey! Can you pull the main branch and check if it works now?

MR-P4NDA commented 4 days ago

Works!

On Fri, Jul 5, 2024, 7:33 AM Roland Ibragimov @.***> wrote:

Hey! Can you pull the main branch and check if it works now?

— Reply to this email directly, view it on GitHub https://github.com/phen0menon/poe-trade-telegram-notifier/issues/3#issuecomment-2210797500, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJRZVQX6GHUNHISDKROUF2DZK2HBJAVCNFSM6AAAAABKE2RDS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJQG44TONJQGA . You are receiving this because you authored the thread.Message ID: @.***>

phen0menon commented 4 days ago

Good news everyone!