*Please copy the whole script, not only the part mentioned here!*
-Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachement in the body of the new post.
+Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachment in the body of the new post.
## Additional notes if it doesn't work
/**
* Interface for writable storage backends
*
- * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachements).
+ * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachments).
* There's only one active writable storage possible. This type of storage is selectable by the current administrator.
*/
interface ICanWriteToStorage extends ICanReadFromStorage
/** @var Card */
private $mstdnCardFactory;
/** @var Attachment */
- private $mstdnAttachementFactory;
+ private $mstdnAttachmentFactory;
/** @var Error */
private $mstdnErrorFactory;
/** @var Poll */
Mention $mstdnMentionFactory,
Tag $mstdnTagFactory,
Card $mstdnCardFactory,
- Attachment $mstdnAttachementFactory,
+ Attachment $mstdnAttachmentFactory,
Error $mstdnErrorFactory,
Poll $mstdnPollFactory,
ContentItem $contentItem
) {
parent::__construct($logger);
- $this->dba = $dba;
- $this->mstdnAccountFactory = $mstdnAccountFactory;
- $this->mstdnMentionFactory = $mstdnMentionFactory;
- $this->mstdnTagFactory = $mstdnTagFactory;
- $this->mstdnCardFactory = $mstdnCardFactory;
- $this->mstdnAttachementFactory = $mstdnAttachementFactory;
- $this->mstdnErrorFactory = $mstdnErrorFactory;
- $this->mstdnPollFactory = $mstdnPollFactory;
- $this->contentItem = $contentItem;
+ $this->dba = $dba;
+ $this->mstdnAccountFactory = $mstdnAccountFactory;
+ $this->mstdnMentionFactory = $mstdnMentionFactory;
+ $this->mstdnTagFactory = $mstdnTagFactory;
+ $this->mstdnCardFactory = $mstdnCardFactory;
+ $this->mstdnAttachmentFactory = $mstdnAttachmentFactory;
+ $this->mstdnErrorFactory = $mstdnErrorFactory;
+ $this->mstdnPollFactory = $mstdnPollFactory;
+ $this->contentItem = $contentItem;
}
/**
$tags = $this->mstdnTagFactory->createFromUriId($uriId);
if ($item['has-media']) {
$card = $this->mstdnCardFactory->createFromUriId($uriId);
- $attachments = $this->mstdnAttachementFactory->createFromUriId($uriId);
+ $attachments = $this->mstdnAttachmentFactory->createFromUriId($uriId);
} else {
$card = new \Friendica\Object\Api\Mastodon\Card([]);
$attachments = [];
}
}
- foreach ($this->mstdnAttachementFactory->createFromUriId($shared_uri_id) as $attachment) {
+ foreach ($this->mstdnAttachmentFactory->createFromUriId($shared_uri_id) as $attachment) {
if (!in_array($attachment, $attachments)) {
$attachments[] = $attachment;
}