Skip to content

Commit

Permalink
日志,通知格式
Browse files Browse the repository at this point in the history
  • Loading branch information
bestruirui committed Feb 17, 2024
1 parent cfa5ab5 commit 2c096dd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# WxPush
使用了[eatmoreapple/openwechat](https://github.com/eatmoreapple/openwechat)提供的API
使用Desktop登陆协议
# WxMIPush

> 感谢[eatmoreapple/openwechat](https://github.com/eatmoreapple/openwechat)提供的API
微信消息转发

- 借助QQ邮箱使用MIPush推送,再也不用把微信挂后台了
- 无需重复扫码登录

- [ ] 支持多个微信号同时转发~
## 部署
运行容器
```
docker run -it \
docker run -d \
--name WxPush \
-e FROM_NAME=#发送者邮箱 \
-e FROM_ADDRESS=#发送者名字 \
-e TO_NAME=#收件人名字 \
Expand All @@ -13,4 +22,9 @@ docker run -it \
-e USERNAME=#smtp的邮箱地址 应该和FROM_NAME的值是一样的 \
-e PASSWORD=#smtp的邮箱密码 \
-v ./data:/app/data \
bestrui/wxpush:1.0
bestrui/wxpush:1.0
```
容器运行后会在控制台打印登录二维码的链接
```
docker logs WxPush
```
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ func main() {
fmt.Println(friendSenderName, ":", msg.Content)
mail.SendEmail(friendSenderName, msg.Content)
} else if msg.IsPicture() {
fmt.Println(friendSenderName, ":", "发送了一张图片")
mail.SendEmail(friendSenderName, "发送了一张图片")
fmt.Println(friendSenderName, ":", "[图片]")
mail.SendEmail(friendSenderName, "[图片]")
} else if msg.IsVoice() {
fmt.Println(friendSenderName, ":", "发送了一段语音")
mail.SendEmail(friendSenderName, "发送了一张图片")
fmt.Println(friendSenderName, ":", "[语音]")
mail.SendEmail(friendSenderName, "[语音]")
} else if msg.IsVideo() {
fmt.Println(friendSenderName, ":", "发送了一段视频")
mail.SendEmail(friendSenderName, "发送了一段视频")
fmt.Println(friendSenderName, ":", "[视频]")
mail.SendEmail(friendSenderName, "[视频]")
} else if msg.IsEmoticon() {
fmt.Println(friendSenderName, ":", "发送了一个表情")
mail.SendEmail(friendSenderName, "发送了一个表情")
fmt.Println(friendSenderName, ":", "[动画表情]")
mail.SendEmail(friendSenderName, "[动画表情]")
}
} else { //群聊发送的消息
groupSender, err := msg.SenderInGroup()
Expand Down

0 comments on commit 2c096dd

Please sign in to comment.