fix activity center unique constraint error (#2524)

This commit is contained in:
Parvesh Monu 2022-02-09 18:45:57 +05:30 committed by GitHub
parent fb1f95a38f
commit 54b35b0510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -1 +1 @@
0.93.4
0.93.5

View File

@ -5,6 +5,8 @@ import (
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/protobuf"
@ -159,6 +161,11 @@ func (m *Messenger) AcceptAllActivityCenterNotifications(ctx context.Context) (*
}
func (m *Messenger) AcceptActivityCenterNotifications(ctx context.Context, ids []types.HexBytes, sync bool) (*MessengerResponse, error) {
if len(ids) == 0 {
return nil, errors.New("notifications ids are not provided")
}
notifications, err := m.persistence.AcceptActivityCenterNotifications(ids)
if err != nil {
return nil, err