$content = '';
+ // Load current theme info after module has been executed as theme could have been set in module
+ $theme_info_file = 'view/theme/' . $this->getCurrentTheme() . '/theme.php';
+ if (file_exists($theme_info_file)) {
+ require_once $theme_info_file;
+ }
+
// Call module functions
if ($this->module_loaded) {
$this->page['page_title'] = $this->module;
}
}
- // Load current theme info after module has been executed as theme could have been set in module
- $theme_info_file = 'view/theme/' . $this->getCurrentTheme() . '/theme.php';
- if (file_exists($theme_info_file)) {
- require_once $theme_info_file;
- }
-
// initialise content region
if ($this->getMode()->isNormal()) {
Core\Addon::callHooks('page_content_top', $this->page['content']);
// The function will ensure that there are no duplicates
$r1 = Diaspora::participantsForThread($item_id, $r1);
- // Add the relay to the list, avoid duplicates
- if (!$followup) {
+ // Add the relay to the list, avoid duplicates.
+ // Don't send community posts to the relay. Forum posts via the Diaspora protocol are looking ugly.
+ if (!$followup && !self::isForumPost($target_item, $owner)) {
$r1 = Diaspora::relayList($item_id, $r1);
}
}
foreach ($r as $rr) {
$conversants[] = $rr['id'];
Logger::log('Public delivery of item ' . $target_item["guid"] . ' (' . $item_id . ') to ' . json_encode($rr), Logger::DEBUG);
- Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
- 'Delivery', $cmd, $item_id, (int)$rr['id']);
+
+ // Ensure that posts with our own protocol arrives before Diaspora posts arrive.
+ // Situation is that sometimes Friendica servers receive Friendica posts over the Diaspora protocol first.
+ // The conversion in Markdown reduces the formatting, so these posts should arrive after the Friendica posts.
+ if ($rr['network'] == Protocol::DIASPORA) {
+ $deliver_options = ['priority' => $a->queue['priority'], 'dont_fork' => true];
+ } else {
+ $deliver_options = ['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true];
+ }
+ Worker::add($deliver_options, 'Delivery', $cmd, $item_id, (int)$rr['id']);
}
}
}
Logger::log('Delivery of item ' . $item_id . ' to ' . json_encode($contact), Logger::DEBUG);
- Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
- 'Delivery', $cmd, $item_id, (int)$contact['id']);
+
+ // Ensure that posts with our own protocol arrives before Diaspora posts arrive.
+ // Situation is that sometimes Friendica servers receive Friendica posts over the Diaspora protocol first.
+ // The conversion in Markdown reduces the formatting, so these posts should arrive after the Friendica posts.
+ if ($contact['network'] == Protocol::DIASPORA) {
+ $deliver_options = ['priority' => $a->queue['priority'], 'dont_fork' => true];
+ } else {
+ $deliver_options = ['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true];
+ }
+ Worker::add($deliver_options, 'Delivery', $cmd, $item_id, (int)$contact['id']);
}
}
/// @TODO This whole thing is hard-coded, better rewrite to Intercepting Filter Pattern (future-todo)
$r = [];
- if (Addon::isEnabled("appnet")) {
- $r[] = ["photo" => "images/appnet.png", "name" => "App.net"];
- }
-
if (Addon::isEnabled("buffer")) {
$r[] = ["photo" => "images/buffer.png", "name" => "Buffer"];
}
$r[] = ["photo" => "images/dreamwidth.png", "name" => "Dreamwidth"];
}
- if (Addon::isEnabled("fbpost")) {
- $r[] = ["photo" => "images/facebook.png", "name" => "Facebook"];
- }
-
if (Addon::isEnabled("ifttt")) {
$r[] = ["photo" => "addon/ifttt/ifttt.png", "name" => "IFTTT"];
}
$r[] = ["photo" => "images/gnusocial.png", "name" => "GNU Social"];
}
- if (Addon::isEnabled("gpluspost")) {
- $r[] = ["photo" => "images/googleplus.png", "name" => "Google+"];
- }
-
/// @TODO old-lost code (and below)?
//if (Addon::isEnabled("ijpost")) {
// $r[] = array("photo" => "images/", "name" => "");