mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Store admin actions in the db, prevent conflicting actions (#2167)
This commit is contained in:
@ -20,6 +20,7 @@ package admin
|
||||
import (
|
||||
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/email"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/media"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/state"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/transport"
|
||||
@ -33,6 +34,14 @@ type Processor struct {
|
||||
mediaManager *media.Manager
|
||||
transportController transport.Controller
|
||||
emailSender email.Sender
|
||||
|
||||
// admin Actions currently
|
||||
// undergoing processing
|
||||
actions *Actions
|
||||
}
|
||||
|
||||
func (p *Processor) Actions() *Actions {
|
||||
return p.actions
|
||||
}
|
||||
|
||||
// New returns a new admin processor.
|
||||
@ -44,5 +53,10 @@ func New(state *state.State, tc typeutils.TypeConverter, mediaManager *media.Man
|
||||
mediaManager: mediaManager,
|
||||
transportController: transportController,
|
||||
emailSender: emailSender,
|
||||
|
||||
actions: &Actions{
|
||||
r: make(map[string]*gtsmodel.AdminAction),
|
||||
state: state,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user