mirror of
https://github.com/friendica/friendica
synced 2025-04-27 12:30:11 +00:00
Issue 13922: "voted" must not be null (#13923)
This commit is contained in:
parent
bb7d25dfc9
commit
d95c9d28a8
4 changed files with 19 additions and 9 deletions
|
@ -67,10 +67,12 @@ class Poll extends BaseFactory
|
|||
|
||||
if (empty($uid)) {
|
||||
$ownvotes = null;
|
||||
$voted = null;
|
||||
} else {
|
||||
$ownvotes = [];
|
||||
$voted = false;
|
||||
}
|
||||
|
||||
return new \Friendica\Object\Api\Mastodon\Poll($question, $options, $expired, $votes, $ownvotes);
|
||||
return new \Friendica\Object\Api\Mastodon\Poll($question, $options, $expired, $votes, $ownvotes, $voted);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\Tag as TagModel;
|
||||
use Friendica\Model\Verb;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Object\Api\Mastodon\Status\FriendicaDeliveryData;
|
||||
|
@ -60,8 +59,6 @@ class Status extends BaseFactory
|
|||
private $mstdnAttachmentFactory;
|
||||
/** @var Emoji */
|
||||
private $mstdnEmojiFactory;
|
||||
/** @var Error */
|
||||
private $mstdnErrorFactory;
|
||||
/** @var Poll */
|
||||
private $mstdnPollFactory;
|
||||
/** @var ContentItem */
|
||||
|
@ -78,7 +75,6 @@ class Status extends BaseFactory
|
|||
Card $mstdnCardFactory,
|
||||
Attachment $mstdnAttachmentFactory,
|
||||
Emoji $mstdnEmojiFactory,
|
||||
Error $mstdnErrorFactory,
|
||||
Poll $mstdnPollFactory,
|
||||
ContentItem $contentItem,
|
||||
ACLFormatter $aclFormatter
|
||||
|
@ -91,7 +87,6 @@ class Status extends BaseFactory
|
|||
$this->mstdnCardFactory = $mstdnCardFactory;
|
||||
$this->mstdnAttachmentFactory = $mstdnAttachmentFactory;
|
||||
$this->mstdnEmojiFactory = $mstdnEmojiFactory;
|
||||
$this->mstdnErrorFactory = $mstdnErrorFactory;
|
||||
$this->mstdnPollFactory = $mstdnPollFactory;
|
||||
$this->contentItem = $contentItem;
|
||||
$this->aclFormatter = $aclFormatter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue