merged from gramsrv upstream
This commit is contained in:
parent
79c64ee916
commit
21a0856587
651 changed files with 54774 additions and 4590 deletions
|
|
@ -53,6 +53,9 @@ func (s *MessageStore) PinPrivateMessage(ctx context.Context, req domain.PinPriv
|
|||
if err := lockUsersForUpdate(ctx, tx, req.OwnerUserID, req.Peer.ID); err != nil {
|
||||
return res, fmt.Errorf("lock pin users: %w", err)
|
||||
}
|
||||
if err := lockDispatchOutboxAppendFences(ctx, tx, []int64{req.OwnerUserID, req.Peer.ID}); err != nil {
|
||||
return res, fmt.Errorf("lock pin dispatch append fences: %w", err)
|
||||
}
|
||||
owned, err := qtx.GetMessageBoxForPin(ctx, sqlcgen.GetMessageBoxForPinParams{
|
||||
OwnerUserID: req.OwnerUserID,
|
||||
PeerType: string(req.Peer.Type),
|
||||
|
|
@ -196,6 +199,9 @@ func (s *MessageStore) UnpinAllPrivateMessages(ctx context.Context, req domain.U
|
|||
if err := lockUsersForUpdate(ctx, tx, req.OwnerUserID, req.Peer.ID); err != nil {
|
||||
return res, fmt.Errorf("lock unpin users: %w", err)
|
||||
}
|
||||
if err := lockDispatchOutboxAppendFences(ctx, tx, []int64{req.OwnerUserID, req.Peer.ID}); err != nil {
|
||||
return res, fmt.Errorf("lock unpin dispatch append fences: %w", err)
|
||||
}
|
||||
ownRows, err := qtx.UnpinAllMessageBoxesByPeer(ctx, sqlcgen.UnpinAllMessageBoxesByPeerParams{
|
||||
OwnerUserID: req.OwnerUserID,
|
||||
PeerType: string(req.Peer.Type),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue