Skip to content

Commit

Permalink
Fix word boundary and grammar of error messages (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
hloeung authored Jun 27, 2021
1 parent 51fbe82 commit 0ea3f4b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mm-go-irckit/server_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func CmdPrivMsg(s Server, u *User, msg *irc.Message) error {

msgID, err2 := u.br.MsgChannel(ch.ID(), msg.Trailing)
if err2 != nil {
u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+msg.Trailing+" could not be send"+err2.Error())
u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+msg.Trailing+" could not be sent "+err2.Error())
return err2
}

Expand Down Expand Up @@ -485,15 +485,15 @@ func parseReactionToMsg(u *User, msg *irc.Message, channelID string) bool {
if action == "-" {
err := u.br.RemoveReaction(msgID, emoji)
if err != nil {
u.MsgSpoofUser(u, u.br.Protocol(), "reaction: "+emoji+" could not be removed"+err.Error())
u.MsgSpoofUser(u, u.br.Protocol(), "reaction: "+emoji+" could not be removed "+err.Error())
}

return true
}

err := u.br.AddReaction(msgID, emoji)
if err != nil {
u.MsgSpoofUser(u, u.br.Protocol(), "reaction: "+emoji+" could not be added"+err.Error())
u.MsgSpoofUser(u, u.br.Protocol(), "reaction: "+emoji+" could not be added "+err.Error())
}

return true
Expand Down Expand Up @@ -569,7 +569,7 @@ func parseModifyMsg(u *User, msg *irc.Message, channelID string) bool {
if strings.Contains(err.Error(), "permissions") {
return false
}
u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+text+" could not be modified"+err.Error())
u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+text+" could not be modified "+err.Error())
} else {
u.saveLastViewedAt(channelID)
}
Expand Down Expand Up @@ -652,7 +652,7 @@ func threadMsgChannelUser(u *User, msg *irc.Message, channelID string, toUser bo
msgID, err = u.br.MsgChannelThread(channelID, threadID, text)
}
if err != nil {
u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+text+" could not be send"+err.Error())
u.MsgSpoofUser(u, u.br.Protocol(), "msg: "+text+" could not be sent "+err.Error())
return false
}

Expand Down

0 comments on commit 0ea3f4b

Please sign in to comment.