Remove eventType parameter from attemptErrorConversationMessage
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-12-18 17:51:22 -08:00
parent 59d54d790d
commit d0911eec57
1 changed files with 3 additions and 3 deletions

View File

@ -1031,14 +1031,14 @@ func (cp *cwtchPeer) eventHandler() {
log.Debugf("failed to acknowledge acknowledgement: %v", err)
}
case event.SendMessageToGroupError:
err := cp.attemptErrorConversationMessage(ev.Data[event.GroupID], ev.Data[event.Signature], event.SendMessageToGroupError, ev.Data[event.Error])
err := cp.attemptErrorConversationMessage(ev.Data[event.GroupID], ev.Data[event.Signature], ev.Data[event.Error])
if err != nil {
log.Errorf("failed to error group message: %s %v", ev.Data[event.GroupID], err)
}
case event.SendMessageToPeerError:
context := ev.Data[event.EventContext]
if context == string(event.SendMessageToPeer) {
err := cp.attemptErrorConversationMessage(ev.Data[event.RemotePeer], ev.Data[event.EventID], event.SendMessageToPeerError, ev.Data[event.Error])
err := cp.attemptErrorConversationMessage(ev.Data[event.RemotePeer], ev.Data[event.EventID], ev.Data[event.Error])
if err != nil {
log.Errorf("failed to error p2p message: %s %v", ev.Data[event.RemotePeer], err)
}
@ -1243,7 +1243,7 @@ func (cp *cwtchPeer) attemptAcknowledgeP2PConversation(handle string, signature
// attemptErrorConversationMessage is a convenience method that looks up the conversation
// by the given handle and attempts to mark the message as errored. returns error on failure
// to either find the contact or the associated message
func (cp *cwtchPeer) attemptErrorConversationMessage(handle string, signature string, eventType event.Type, error string) error {
func (cp *cwtchPeer) attemptErrorConversationMessage(handle string, signature string, error string) error {
ci, err := cp.FetchConversationInfo(handle)
// We should *never* received an error for a conversation that doesn't exist...
if ci != nil && err == nil {