42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.65k stars 618 forks source link

Any willingness to port this to whatsmeow #1642

Closed XP-Fan closed 2 years ago

XP-Fan commented 2 years ago

Hey friends, first of all thank you for this mega amazing project and sorry if this has a doublicate but I couldn't find it yet, which I think is a bit weird considering how many people write issues in here. Anyway: Currently you're using gowhatsapp, which requires a persistent connection to a phone. So, basically a phone is a single point of failure for the whatsapp-bridge. I wonder whether you'd be willing to port this to whatsmeow (https://github.com/tulir/whatsmeow) which is also a go-library to interact directly with whatsapp's new multi device API, so the phone is no longer permanently needed?

42wim commented 2 years ago

it's on my todo, but no time yet. I'm of course willing to accept PRs also.

XP-Fan commented 2 years ago

Well perfect! So far I guess we still have around 6 months till the websocket-API will be deprecated, so it's awesome to know that whatsapp in matterbridge will still have a future afterwards. Unfortunately I personally cannot help you because I never worked with highlevel languages, I'm a hardcore pure assembly-guy.

XP-Fan commented 2 years ago

So, since I just realized that I cannot scan a QR-code with Android on a raspberrypi by any means, I wouldn't know of any stationary device one could use to run a bridge bot permanently. I mean you cannot leave a phone connected to a charger for years as this would destroy the battery which might then just blow up and explode. This way I guess that thing is rather urgent, so can anyone give me a timeframe till when this will be implemented? I could also donate a bit, or I'll have to try to find and hire some coder to do it or make an alternative.

qaisjp commented 2 years ago

You can run a VM, as documented on wiki: https://github.com/42wim/matterbridge/wiki/Section-WhatsApp-%28basic%29#is-it-possible-to-run-wa-on-virtual-android-vm

XP-Fan commented 2 years ago

Well I wonder how this could be considered practical given that V4L2 only supports a single data stream, which is a problem for QR-readers. This was also why I wasn't able to scan the code on the raspberrypi. Besides the AVD-thing is super complex to do, it requires you install Java and other trash, so one would have to buy a dedicated computer (probably at least a gaming-grade one) to get this to work performantly.

XP-Fan commented 2 years ago

BTW: WhatsApp for KaiOS doesn't support WhatsApp Web.

webmeister commented 2 years ago

So far I guess we still have around 6 months till the websocket-API will be deprecated

Rhymen/go-whatsapp has already been effectively discontinued, see https://github.com/Rhymen/go-whatsapp/issues/622.

Porting to whatsmeow might also fix other WhatsApp issues like https://github.com/42wim/matterbridge/issues/1363.

42wim commented 2 years ago

There is now PR #1702 can anyone test this and report back? I don't have/use whatsapp, so it's blind ported :) You can also find artifacts below on: https://github.com/42wim/matterbridge/actions/runs/1786414471

Updated link

XP-Fan commented 2 years ago

Yo sorry I've been real busy these days, however now I cannot seem to download the binary. I can see it in the table of the artifacts but it's not clickable. No clue what to do here. Could you please direct-link me to the macos binary?

-----Original Message----- From: Wim @.*** Sent: Montag, 31. Januar 2022 00:46 To: 42wim/matterbridge Cc: XP-Fan; State change Subject: Re: [42wim/matterbridge] Any willingness to port this to whatsmeow (Issue #1642)

There is now PR #1702 https://github.com/42wim/matterbridge/pull/1702 can anyone test this and report back? I don't have/use whatsapp, so it's blind ported :) You can also find artifacts below on: https://github.com/42wim/matterbridge/actions/runs/1770089248

— Reply to this email directly, view it on GitHub https://github.com/42wim/matterbridge/issues/1642#issuecomment-1025262386 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKEBHTOCAGW27FOHZWL4LO3UYXESZANCNFSM5IODWWBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you modified the open/close state. https://github.com/notifications/beacon/AKEBHTPZXF24V7MCJSVSAQDUYXESZA5CNFSM5IODWWBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHUOEGMQ.gif Message ID: @.***>