Skip to content

Commit

Permalink
send the hmac through
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Jan 6, 2025
1 parent b46a5cd commit c147adc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/mls/api/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ func (s *Service) SendGroupMessages(ctx context.Context, req *mlsv1.SendGroupMes
log.Warn("invalid group id", zap.Error(err))
return nil, status.Error(codes.InvalidArgument, "invalid group id")
}
msg, err := s.store.InsertGroupMessage(ctx, decodedGroupId, input.GetV1().Data)

msgV1 := input.GetV1()
msg, err := s.store.InsertGroupMessage(ctx, decodedGroupId, msgV1.Data)
if err != nil {
log.Warn("error inserting message", zap.Error(err))
if mlsstore.IsAlreadyExistsError(err) {
Expand All @@ -242,6 +244,7 @@ func (s *Service) SendGroupMessages(ctx context.Context, req *mlsv1.SendGroupMes
CreatedNs: uint64(msg.CreatedAt.UnixNano()),
GroupId: msg.GroupID,
Data: msg.Data,
SenderHmac: msgV1.SenderHmac,
},
},
})
Expand Down

0 comments on commit c147adc

Please sign in to comment.