Skip to content

Commit

Permalink
fix: #110 #428 修复回复由自己发送私聊消息抛出1204错误 (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clov614 authored Aug 16, 2024
1 parent 98ed719 commit 2b6fdcd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (m *Message) IsSelfSendToGroup() bool {
func (m *Message) ReplyText(content string) (*SentMessage, error) {
// 判断是否由自己发送
username := m.FromUserName
if m.IsSelfSendToGroup() {
if m.IsSendBySelf() {
username = m.ToUserName
}
return m.Owner().sendTextToUser(username, content)
Expand All @@ -181,7 +181,7 @@ func (m *Message) ReplyText(content string) (*SentMessage, error) {
func (m *Message) ReplyEmoticon(md5 string, file io.Reader) (*SentMessage, error) {
// 判断是否由自己发送
username := m.FromUserName
if m.IsSelfSendToGroup() {
if m.IsSendBySelf() {
username = m.ToUserName
}
return m.Owner().sendEmoticonToUser(username, md5, file)
Expand All @@ -191,7 +191,7 @@ func (m *Message) ReplyEmoticon(md5 string, file io.Reader) (*SentMessage, error
func (m *Message) ReplyImage(file io.Reader) (*SentMessage, error) {
// 判断是否由自己发送
username := m.FromUserName
if m.IsSelfSendToGroup() {
if m.IsSendBySelf() {
username = m.ToUserName
}
return m.Owner().sendImageToUser(username, file)
Expand All @@ -201,7 +201,7 @@ func (m *Message) ReplyImage(file io.Reader) (*SentMessage, error) {
func (m *Message) ReplyVideo(file io.Reader) (*SentMessage, error) {
// 判断是否由自己发送
username := m.FromUserName
if m.IsSelfSendToGroup() {
if m.IsSendBySelf() {
username = m.ToUserName
}
return m.Owner().sendVideoToUser(username, file)
Expand All @@ -211,7 +211,7 @@ func (m *Message) ReplyVideo(file io.Reader) (*SentMessage, error) {
func (m *Message) ReplyFile(file io.Reader) (*SentMessage, error) {
// 判断是否由自己发送
username := m.FromUserName
if m.IsSelfSendToGroup() {
if m.IsSendBySelf() {
username = m.ToUserName
}
return m.Owner().sendFileToUser(username, file)
Expand Down

0 comments on commit 2b6fdcd

Please sign in to comment.