mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 17:02:25 -05:00
[feature] unending polls (#3592)
* adds support for unending polls to be created locally * remove unused argument
This commit is contained in:
parent
79f2e85f51
commit
3e18d97a6e
3 changed files with 53 additions and 30 deletions
|
|
@ -444,7 +444,7 @@ func (c *Converter) StatusToAS(ctx context.Context, s *gtsmodel.Status) (ap.Stat
|
|||
poll := streams.NewActivityStreamsQuestion()
|
||||
|
||||
// Add required status poll data to AS Question.
|
||||
if err := c.addPollToAS(ctx, s.Poll, poll); err != nil {
|
||||
if err := c.addPollToAS(s.Poll, poll); err != nil {
|
||||
return nil, gtserror.Newf("error converting poll: %w", err)
|
||||
}
|
||||
|
||||
|
|
@ -708,7 +708,7 @@ func (c *Converter) StatusToAS(ctx context.Context, s *gtsmodel.Status) (ap.Stat
|
|||
return status, nil
|
||||
}
|
||||
|
||||
func (c *Converter) addPollToAS(ctx context.Context, poll *gtsmodel.Poll, dst ap.Pollable) error {
|
||||
func (c *Converter) addPollToAS(poll *gtsmodel.Poll, dst ap.Pollable) error {
|
||||
var optionsProp interface {
|
||||
// the minimum interface for appending AS Notes
|
||||
// to an AS type options property of some kind.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue