8000 [fix]: 修复当好友和群组修改备注后,依然使用的是原来的备注 by eatmoreapple · Pull Request #337 · eatmoreapple/openwechat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[fix]: 修复当好友和群组修改备注后,依然使用的是原来的备注 #337

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

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,11 @@ func (s *Self) SendFileToFriend(friend *Friend, file io.Reader) (*SentMessage, e
// self.SetRemarkNameToFriend(friend, "remark") // or friend.SetRemarkName("remark")
func (s *Self) SetRemarkNameToFriend(friend *Friend, remarkName string) error {
req := s.bot.Storage.Request
return s.bot.Caller.WebWxOplog(req, remarkName, friend.UserName)
err := s.bot.Caller.WebWxOplog(req, remarkName, friend.UserName)
if err == nil {
friend.RemarkName = remarkName
}
return err
}

// CreateGroup 创建群聊
Expand Down Expand Up @@ -513,7 +517,11 @@ func (s *Self) AddFriendIntoManyGroups(friend *Friend, groups ...*Group) error {
func (s *Self) RenameGroup(group *Group, newName string) error {
req := s.bot.Storage.Request
info := s.bot.Storage.LoginInfo
return s.bot.Caller.WebWxRenameChatRoom(req, info, newName, group)
err := s.bot.Caller.WebWxRenameChatRoom(req, info, newName, group)
if err == nil {
group.NickName = newName
}
return err
}

// SendTextToGroup 发送文本消息给群组
Expand Down
0