diff --git a/groupChat/receiveRequest.go b/groupChat/receiveRequest.go index eaacd5981f6009d79806438300389943f0e94df9..3149c122048a8a65415e17786dac372b55941e74 100644 --- a/groupChat/receiveRequest.go +++ b/groupChat/receiveRequest.go @@ -56,7 +56,7 @@ func (l *requestListener) Name() string { return catalog.GroupRq } -// readRequest returns the group describes in the group request message. An +// readRequest returns the group described in the group request message. An // error is returned if the request is of the wrong type or cannot be read. func (m *Manager) readRequest(msg receive.Message) (gs.Group, error) { // Return an error if the message is not of the right type diff --git a/groupChat/sendRequests.go b/groupChat/sendRequests.go index d5871731f5473befd146af36fc317ce4db2a82fb..f87b53bb9b3d3c761145897d2c70c2dcd01f02e0 100644 --- a/groupChat/sendRequests.go +++ b/groupChat/sendRequests.go @@ -30,7 +30,7 @@ const ( // ResendRequest allows a groupChat request to be sent again. func (m Manager) ResendRequest(groupID *id.ID) ([]id.Round, RequestStatus, error) { - g, exists := m.gs.Get(groupID) + g, exists := m.GetGroup(groupID) if !exists { return nil, NotSent, errors.Errorf(resendGroupIdErr, groupID) } @@ -94,10 +94,13 @@ func (m Manager) sendRequests(g gs.Group) ([]id.Round, RequestStatus, error) { errors.Errorf(sendRequestAllErr, len(errs), strings.Join(errs, "\n")) } + // Convert roundIdMap to List + roundList := roundIdMap2List(roundIDs) + // If some sends returned an error, then return a list of round IDs for the // successful sends and a list of errors for the failed ones if len(errs) > 0 { - return roundIdMap2List(roundIDs), PartialSent, + return roundList, PartialSent, errors.Errorf(sendRequestPartialErr, len(errs), n, strings.Join(errs, "\n")) } @@ -106,7 +109,7 @@ func (m Manager) sendRequests(g gs.Group) ([]id.Round, RequestStatus, error) { len(g.Members), g.Name, g.ID) // If all sends succeeded, return a list of roundIDs - return roundIdMap2List(roundIDs), AllSent, nil + return roundList, AllSent, nil } // sendRequest sends the group request to the user via E2E.