// We don't fork a new process since this is done anyway with the following command
Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], "CreateShadowEntry", $post_id);
+ // When we are doing some forum posting via ! we have to start the notifier manually.
+ // These kind of posts don't initiate the notifier call in the item class.
+ if ($only_to_forum) {
+ Worker::add(PRIORITY_HIGH, "Notifier", $notify_type, $post_id);
+ }
+
Logger::log('post_complete');
if ($api_source) {
$tags_string = '';
foreach ($taglist as $tag) {
- if ((substr(trim($tag), 0, 1) == '#') || (substr(trim($tag), 0, 1) == '@')) {
+ if ((substr(trim($tag), 0, 1) == '#') || (substr(trim($tag), 0, 1) == '@') || (substr(trim($tag), 0, 1) == '!')) {
$tags_string .= ' ' . trim($tag);
} else {
$tags_string .= ' #' . trim($tag);
}
}
- $pattern = '/\W([\#@])\[url\=(.*?)\](.*?)\[\/url\]/ism';
+ $pattern = '/\W([\#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism';
if (preg_match_all($pattern, $data, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
- if ($match[1] == '@') {
+ if (($match[1] == '@') || ($match[1] == '!')) {
$contact = Contact::getDetailsByURL($match[2], 0);
if (!empty($contact['addr'])) {
$match[3] = $contact['addr'];
$type = TERM_HASHTAG;
$term = substr($tag, 1);
- } elseif (substr(trim($tag), 0, 1) == '@') {
+ } elseif ((substr(trim($tag), 0, 1) == '@') || (substr(trim($tag), 0, 1) == '!')) {
$type = TERM_MENTION;
$contact = Contact::getDetailsByURL($link, 0);
]);
// Search for mentions
- if ((substr($tag, 0, 1) == '@') && (strpos($link, $profile_base_friendica) || strpos($link, $profile_base_diaspora))) {
+ if (((substr($tag, 0, 1) == '@') || (substr($tag, 0, 1) == '!')) && (strpos($link, $profile_base_friendica) || strpos($link, $profile_base_diaspora))) {
$users = q("SELECT `uid` FROM `contact` WHERE self AND (`url` = '%s' OR `nurl` = '%s')", $link, $link);
foreach ($users AS $user) {
if ($user['uid'] == $message['uid']) {