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

未关闭
#54 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
go
领域
api, backend

调研方向

首先定位已连接的 WhatsApp 实例在哪里创建并保持活动状态,然后跟踪 WhatsMeow 客户端的生命周期和 Presence 处理。使用报告中的 v0.7.1 Docker 行为作为复现案例。完成的标准是:实例保持连接期间,已连接的 Android 和 iOS 应用继续接收 WhatsApp 通知,并且关闭后不会让 Presence ticker 继续运行。

由索引模型根据 Issue 内容生成。

描述

bug
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)
	}
}()
主要语言
Go
星标
971
派生
519
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

evolution-foundation/evolution-go 的其他 Issue

查看 evolution-foundation/evolution-go 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。