fix: receiver里fileHelper为空的情况 (#186)
Co-authored-by: tgNotHouse <gqwj007@gmail.com>
This commit is contained in:
parent
9b5590f708
commit
88b6a34307
@ -148,3 +148,6 @@ var videoType = "mp4"
|
||||
// ZombieText 检测僵尸好友字符串
|
||||
// 发送该字符给好友,能正常发送不报错的为正常好友,否则为僵尸好友
|
||||
const ZombieText = "وُحfخe ̷̴̐nخg ̷̴̐cخh ̷̴̐aخo امارتيخ ̷̴̐خ\n"
|
||||
|
||||
// FileHelper 文件传输助手
|
||||
const FileHelper = "filehelper"
|
||||
|
@ -114,9 +114,10 @@ func (m *Message) Receiver() (*User, error) {
|
||||
return m.bot.self.User, nil
|
||||
}
|
||||
// https://github.com/eatmoreapple/openwechat/issues/113
|
||||
if m.ToUserName == m.bot.self.fileHelper.UserName {
|
||||
return m.bot.self.fileHelper.User, nil
|
||||
if m.ToUserName == FileHelper {
|
||||
return m.bot.self.FileHelper().User, nil
|
||||
}
|
||||
|
||||
if m.IsSendByGroup() {
|
||||
groups, err := m.bot.self.Groups()
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user