Troubleshoot misskey follows
Store the original follow request object and use it for approvals. Closes #1690
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.13.0
|
||||
// source: query.sql
|
||||
|
||||
package db
|
||||
@@ -10,17 +12,18 @@ import (
|
||||
)
|
||||
|
||||
const addFollower = `-- name: AddFollower :exec
|
||||
INSERT INTO ap_followers(iri, inbox, request, name, username, image, approved_at) values($1, $2, $3, $4, $5, $6, $7)
|
||||
INSERT INTO ap_followers(iri, inbox, request, request_object, name, username, image, approved_at) values($1, $2, $3, $4, $5, $6, $7, $8)
|
||||
`
|
||||
|
||||
type AddFollowerParams struct {
|
||||
Iri string
|
||||
Inbox string
|
||||
Request string
|
||||
Name sql.NullString
|
||||
Username string
|
||||
Image sql.NullString
|
||||
ApprovedAt sql.NullTime
|
||||
Iri string
|
||||
Inbox string
|
||||
Request string
|
||||
RequestObject []byte
|
||||
Name sql.NullString
|
||||
Username string
|
||||
Image sql.NullString
|
||||
ApprovedAt sql.NullTime
|
||||
}
|
||||
|
||||
func (q *Queries) AddFollower(ctx context.Context, arg AddFollowerParams) error {
|
||||
@@ -28,6 +31,7 @@ func (q *Queries) AddFollower(ctx context.Context, arg AddFollowerParams) error
|
||||
arg.Iri,
|
||||
arg.Inbox,
|
||||
arg.Request,
|
||||
arg.RequestObject,
|
||||
arg.Name,
|
||||
arg.Username,
|
||||
arg.Image,
|
||||
@@ -229,7 +233,7 @@ func (q *Queries) GetFederationFollowersWithOffset(ctx context.Context, arg GetF
|
||||
}
|
||||
|
||||
const getFollowerByIRI = `-- name: GetFollowerByIRI :one
|
||||
SELECT iri, inbox, name, username, image, request, created_at, approved_at, disabled_at FROM ap_followers WHERE iri = $1
|
||||
SELECT iri, inbox, name, username, image, request, request_object, created_at, approved_at, disabled_at FROM ap_followers WHERE iri = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetFollowerByIRI(ctx context.Context, iri string) (ApFollower, error) {
|
||||
@@ -242,6 +246,7 @@ func (q *Queries) GetFollowerByIRI(ctx context.Context, iri string) (ApFollower,
|
||||
&i.Username,
|
||||
&i.Image,
|
||||
&i.Request,
|
||||
&i.RequestObject,
|
||||
&i.CreatedAt,
|
||||
&i.ApprovedAt,
|
||||
&i.DisabledAt,
|
||||
|
||||
Reference in New Issue
Block a user