-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support forwarding messages with attachments #1
Comments
I'll go ahead and take this issue! New to this repo so any notes on how best to start? |
Hi, sure go for it! I'd recommend running it first and finding out how it works on top, then it would be easier to tackle the issue. New messages support can be done by test message example: I'm planning to add some schema of how these things work together but a bit short on time at the moment. |
Awesome! I think i've finally parsed the code and got a good grip on everything. Moving to implement this functionality over the next two days. Quick question. I see in some comments here in root.go you have a TODO for webhooks. Whats the reasoning to migrate this to webhooks and should that be an issue after this is completed as well? |
Good, glad to hear that! The webhook is just an alternative way to get updates from Telegram API, long story short - it avoids long polling from the client's side. It's not a blocker, just a way to improve the service. |
So i've gone ahead and written all the code for the forwarding but while testing can't even get past the QR code scan. I swithced back to the main branch (and even recloned) to see if it was something I did but it seems I must've never tested getting past the QR step. Getting a panic: export TELEGRAM_API_TOKEN=<API_TOKEN>; ./twbridge goroutine 12 [running]: Looks like this is the current state of the repo. Will dig into this tomorrow myself but any ideas here? Does this happen on your machine? |
Just checked it on the main branch - works fine. The panic comes from the client library that is used to work with WhatsApp (https://github.com/Rhymen/go-whatsapp), it might not support all versions of WhatsApp Web API. I'm planning to switch to another library that works with WhatsApp Web API, the current is poorly designed, and looks like nobody maintains it. |
So unfortunately it looks like most recent build in IOS for USA is no longer multi-device beta. There is no way for me to disable it and I've tried a friends phone too. Recloned and tried on main branch and I'm getting the same error when attempting to test :( |
As a workaround before we switched to multi-device library, you can submit a PR and I'll test it. What do you think? |
Yes I will do but I'm not 100% sure about my implementation - I tried following similar approach to how QR code byte array was uploaded to Telegram with bytes for image coming from message.Download() on line 163 of events_provider.go. |
Just did! I dug into the whatsmeow and think I can make the refactor to that library. Will try to start testing tonight. |
For now, only text messages are supported but it's not a big deal to add other types.
See handler whatsapp implementation:
https://github.com/Rhymen/go-whatsapp/blob/v0.1.1/handler.go
The text was updated successfully, but these errors were encountered: