Commit 5cb1f0e9 authored by Thomas's avatar Thomas
Browse files

Prepares release 1.0.8

parent ef0458f1
......@@ -27,8 +27,6 @@ class CollectMastodonData {
/** @var \Mastodon_api */
private $api;
/** @var string url of the mastodon instance */
private $mastodonUrl = '';
/** @var string token to authenticate at the mastodon instance */
private $bearerToken;
......@@ -118,13 +116,13 @@ class CollectMastodonData {
public function getComments($id, &$result) {
$raw = file_get_contents("$id/context");
$raw = file_get_contents($this->mastodonUrl . "/api/v1/statuses/$id/context");
$json = json_decode($raw, true);
$this->filterComments($json['descendants'], $id, $result);
public function getStatistics($id, &$result) {
$raw = file_get_contents("$id");
$raw = file_get_contents($this->mastodonUrl ." /api/v1/statuses/$id");
$json = json_decode($raw, true);
$newStats = $this->filterStats($json);
$result['stats']['reblogs'] += $newStats['reblogs'];
......@@ -14,15 +14,33 @@ Mastalab comments allows to display comments from Mastodon and Peertube related
== Description ==
Mastalab Comments is a plugin for Mastodon and Peertube. You will need an account on a Mastodon instance like
If you don't have an account, you can pick up an instance at an register on it.
Mastodon is a decentralized social Network, that means it's run by several instances (host). If you don't know what Mastodon is, you can have more info at
The plugin uses the Mastodon and Peertube API (the last one currently doesn't need credentials).
**What is Mastalab comments?**
Mastalab Comments will automatically display comments from Mastodon corresponding to the URL of your articles in the comment area of your site.
In other words, if you publish a URL on Mastodon and people leave comments, they will be automatically displayed below your articles.
The plugin also allows to display comments below Peertube videos.
**What do I need?**
You need an account on Mastodon that will publish URLs for your articles.
**What is Mastodon?**
Mastodon is a distributed, federated social network that forms part of the Fediverse, an interconnected and decentralized network of independently operated servers.
Sources: [Wikipedia](
**How to get started with Mastodon?**
The best way is to visit []( You can also have a look to the [FAQ](
**How to block comments?**
Comments are displayed related to the connected account. That means you have to mute the account with your Mastodon account. In future releases, this part might be improved.
You need to connect an account to your Mastodon instance. The plugin will only uses the scope "read" to fetch toots containing your Wordpress URL.
The plugin will use an authorization code for the authentication. You will be able to disconnect or change the connected account at any time.
If you want to hide comment, use your connected account on Mastodon to mute the accounts that you don't want to see comments.
......@@ -39,6 +57,10 @@ e.g.
== Changelog ==
= 1.0.8 =
* Fix an issue with comments
* Improve README.txt
= 1.0.7 =
* Add custom emojis
* Fix an issue with Peertube comments and cache
......@@ -16,7 +16,7 @@
* Plugin Name: Mastalab comments
* Plugin URI:
* Description: Display comments coming from Mastodon and Peertube related to a URL
* Version: 1.0.7
* Version: 1.0.8
* Author: Thomas Schneider
* Author URI:
* License: GPL-2.0+
......@@ -35,7 +35,7 @@ if ( ! defined( 'WPINC' ) ) {
* Start at version 1.0.0 and use SemVer -
* Rename this for your plugin and update it as you release new versions.
define( 'MASTALAB_COMMENT_VERSION', '1.0.7' );
define( 'MASTALAB_COMMENT_VERSION', '1.0.8' );
* The code that runs during plugin activation.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment