mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 05:02:24 -06:00
[feature] add support for polls + receiving federated status edits (#2330)
This commit is contained in:
parent
7204ccedc3
commit
e9e5dc5a40
84 changed files with 3992 additions and 570 deletions
|
|
@ -85,6 +85,21 @@ func wipeStatusF(state *state.State, media *media.Processor, surface *surface) w
|
|||
errs.Appendf("error deleting status faves: %w", err)
|
||||
}
|
||||
|
||||
if pollID := statusToDelete.PollID; pollID != "" {
|
||||
// Delete this poll by ID from the database.
|
||||
if err := state.DB.DeletePollByID(ctx, pollID); err != nil {
|
||||
errs.Appendf("error deleting status poll: %w", err)
|
||||
}
|
||||
|
||||
// Delete any poll votes pointing to this poll ID.
|
||||
if err := state.DB.DeletePollVotes(ctx, pollID); err != nil {
|
||||
errs.Appendf("error deleting status poll votes: %w", err)
|
||||
}
|
||||
|
||||
// Cancel any scheduled expiry task for poll.
|
||||
_ = state.Workers.Scheduler.Cancel(pollID)
|
||||
}
|
||||
|
||||
// delete all boosts for this status + remove them from timelines
|
||||
boosts, err := state.DB.GetStatusBoosts(
|
||||
// we MUST set a barebones context here,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue