mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 16:32:25 -05:00
Add preview card storing to the database
This commit is contained in:
parent
85c32526f2
commit
6169351d22
12 changed files with 228 additions and 55 deletions
|
|
@ -197,7 +197,14 @@ func (p *Processor) Create(
|
|||
|
||||
if card != nil {
|
||||
status.CardID = id.NewULIDFromTime(now)
|
||||
card.ID = status.CardID
|
||||
status.Card = card
|
||||
|
||||
// Insert this newly prepared preview card into the database.
|
||||
if err := p.state.DB.PutCard(ctx, card); err != nil {
|
||||
err := gtserror.Newf("error inserting preview card in db: %w", err)
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Only store ContentWarningText if the parsed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue