Skip to content
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

[Feature Request] Display notification when either PC or phone is disconnected #25

Closed
Zzombiee2361 opened this issue Apr 28, 2020 · 8 comments · Fixed by #34
Closed
Assignees
Labels
enhancement New feature or request

Comments

@Zzombiee2361
Copy link
Collaborator

Feathub Feature Link: https://feathub.com/cstayyab/WALC/+5

Is your feature request related to a problem? Please describe.
Sometimes when my phone got disconnected like when wifi goes out of range and data is off or when whatsapp is killed by battery saver, I didn't realize and missed many important messages.

Describe the solution you'd like
It would be cool to be notified when it happens so I don't miss any messages.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
I would like to be notified when this happens


To view all feature requests and to vote for your favorite ones visit https://feathub.com/cstayyab/WALC This will help in determining which feature needs to be implemented first

@Zzombiee2361 Zzombiee2361 added the enhancement New feature or request label Apr 28, 2020
@cstayyab
Copy link
Collaborator

cstayyab commented May 4, 2020

WALC now shows a notification if PC goes offline or WhatsApp Web Server is not accessible due to some reason. Same for mobile still needs to be done.

@Zzombiee2361
Copy link
Collaborator Author

I think it's better to display the custom offline page only when the page can't load. If the page is already loaded and the network goes offline, let the page be. It's simpler and faster to let whatsapp handle it on its own. Reloading the page takes more time than simply reconnecting.

@cstayyab
Copy link
Collaborator

cstayyab commented May 5, 2020

@Zzombiee2361 I like your suggestion. I will implement it.

@Zzombiee2361
Copy link
Collaborator Author

Bump! Are you currently working on this? I'd like to try implementing this myself if you're not.

Also, the custom offline page is blindly bright when dark mode is enabled, you might wanna change that.

@cstayyab
Copy link
Collaborator

cstayyab commented May 16, 2020

I am not currently working on this due to some constraints on my side. You are free to give it a try. Draft a pull request an I will attach this issue to that PR.

Here is a sample you can use after finding the CSS selector that WhatsApp is using to show the "Phone not connected" banner:

const KEEP_PHONE_CONNECTED_IMG_SELECTOR = '[data-asset-intro-image="true"]';
page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 0 }).then(()=> {
// Your Code here
});

@AlwaysBeCalm
Copy link

AlwaysBeCalm commented May 18, 2020

Hi @cstayyab

The icon on the tray menu is showing that I have new messages even though I've muted all me chats, while on web.whatsapp it doesn't show notifications for muted chats.

muted 2

this image is when I unmuted one of my chats... 👇

unmuted 1

it's supposed to show notifications only for unmuted chats, right?

thanks for your time and effort 🌹 🌹

@Zzombiee2361
Copy link
Collaborator Author

Hello @AlwaysBeCalm

I implemented this feature and it is intended that way, kinda like telegram desktop does, although telegram tray badge is colored gray when there's unread only on muted chats. Do you want similar behavior or just not count the muted chats?

Btw this is not a relevant issue, you should open a new issue or comment on #26

@AlwaysBeCalm
Copy link

@Zzombiee2361
I think it's best to be optional like Telegram.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants