diff options
author | 2024-08-24 11:49:37 +0200 | |
---|---|---|
committer | 2024-08-24 11:49:37 +0200 | |
commit | f23f04e0b1d117be714bf91d5266dab219ed741e (patch) | |
tree | 0b3ddd60d51c8729949c3669993910a7f8f32a7b /internal/gtsmodel/interactionapproval.go | |
parent | [performance] ffmpeg ffprobe wrapper improvements (#3225) (diff) | |
download | gotosocial-f23f04e0b1d117be714bf91d5266dab219ed741e.tar.xz |
[feature] Interaction requests client api + settings panel (#3215)
* [feature] Interaction requests client api + settings panel
* test accept / reject
* fmt
* don't pin rejected interaction
* use single db model for interaction accept, reject, and request
* swaggor
* env sharting
* append errors
* remove ErrNoEntries checks
* change intReqID to reqID
* rename "pend" to "request"
* markIntsPending -> mark interactionsPending
* use log instead of returning error when rejecting interaction
* empty migration
* jolly renaming
* make interactionURI unique again
* swag grr
* remove unnecessary locks
* invalidate as last step
Diffstat (limited to 'internal/gtsmodel/interactionapproval.go')
-rw-r--r-- | internal/gtsmodel/interactionapproval.go | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/internal/gtsmodel/interactionapproval.go b/internal/gtsmodel/interactionapproval.go deleted file mode 100644 index f6a5da83b..000000000 --- a/internal/gtsmodel/interactionapproval.go +++ /dev/null @@ -1,55 +0,0 @@ -// GoToSocial -// Copyright (C) GoToSocial Authors admin@gotosocial.org -// SPDX-License-Identifier: AGPL-3.0-or-later -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -package gtsmodel - -import "time" - -// InteractionApproval refers to a single Accept activity sent -// *from this instance* in response to an interaction request, -// in order to approve it. -// -// Accepts originating from remote instances are not stored -// using this format; the URI of the remote Accept is instead -// just added to the *gtsmodel.StatusFave or *gtsmodel.Status. -type InteractionApproval struct { - ID string `bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database - CreatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item created - UpdatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item last updated - AccountID string `bun:"type:CHAR(26),nullzero,notnull"` // id of the account that owns this accept/approval - Account *Account `bun:"-"` // account corresponding to accountID - InteractingAccountID string `bun:"type:CHAR(26),nullzero,notnull"` // id of the account that did the interaction that this Accept targets. - InteractingAccount *Account `bun:"-"` // account corresponding to targetAccountID - InteractionURI string `bun:",nullzero,notnull"` // URI of the target like, reply, or announce - InteractionType InteractionType `bun:",notnull"` // One of Like, Reply, or Announce. - URI string `bun:",nullzero,notnull,unique"` // ActivityPub URI of the Accept. -} - -// Like / Reply / Announce -type InteractionType int - -const ( - // WARNING: DO NOT CHANGE THE ORDER OF THESE, - // as this will cause breakage of approvals! - // - // If you need to add new interaction types, - // add them *to the end* of the list. - - InteractionLike InteractionType = iota - InteractionReply - InteractionAnnounce -) |