Skip to content

[Bug] Notifications on APP was gone after connected to EvoGo #54

@marcelotadeujr

Description

@marcelotadeujr

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

After connected to EvoGo, whatsapp notifications was gone.

What did you expect?

Continue receiving WhatsApp notifications in the app after connecting to EvoGo.

What did you observe instead of what you expected?

Notifications in the WhatsApp application (Android/iOS) stopped being displayed after connecting to EvoGo, instead of continuing to be received.

Screenshots/Videos

No response

Which version are you using?

v0.7.1

What is your environment?

Docker

If applicable, paste the log output

No response

Additional Notes

This is a known bug and its easy to solve, just sending the presence: unavailable event every 15s on every connected instance. But i'm new on evoGo stack and dont know the best place to do that.

This solution i wrote in another project that use WhatsMeow:

func setUnavailable(log *logrus.Logger, cli *whatsmeow.Client) {
	if cli.IsLoggedIn() {
		var err = cli.SendPresence(context.Background(), types.PresenceUnavailable)

		if err != nil {
			logger.Infof("Error to deactivate presence")
		}
	}
}

//Setar unavailable para receber os notify no app
ticker := time.NewTicker(15 * time.Second)
defer ticker.Stop()

go func() {
	for range ticker.C {
		setUnavailable(logger, cli)
	}
}()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions