forked from GNUsocial/gnu-social
move mention detection before default in OStatusPlugin
This commit is contained in:
parent
c79c70ea2c
commit
a0c255e231
@ -224,7 +224,7 @@ class OStatusPlugin extends Plugin
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onEndFindMentions($sender, $text, &$mentions)
|
function onStartFindMentions($sender, $text, &$mentions)
|
||||||
{
|
{
|
||||||
preg_match_all('/(?:^|\s+)@((?:\w+\.)*\w+@(?:\w+\.)*\w+(?:\w+\-\w+)*\.\w+)/',
|
preg_match_all('/(?:^|\s+)@((?:\w+\.)*\w+@(?:\w+\.)*\w+(?:\w+\-\w+)*\.\w+)/',
|
||||||
$text,
|
$text,
|
||||||
@ -464,14 +464,13 @@ class OStatusPlugin extends Plugin
|
|||||||
$oprofile = Ostatus_profile::staticGet('group_id', $group->id);
|
$oprofile = Ostatus_profile::staticGet('group_id', $group->id);
|
||||||
if ($oprofile) {
|
if ($oprofile) {
|
||||||
// Drop the PuSH subscription if there are no other subscribers.
|
// Drop the PuSH subscription if there are no other subscribers.
|
||||||
|
|
||||||
$members = $group->getMembers(0, 1);
|
$members = $group->getMembers(0, 1);
|
||||||
if ($members->N == 0) {
|
if ($members->N == 0) {
|
||||||
common_log(LOG_INFO, "Unsubscribing from now-unused group feed $oprofile->feeduri");
|
common_log(LOG_INFO, "Unsubscribing from now-unused group feed $oprofile->feeduri");
|
||||||
$oprofile->unsubscribe();
|
$oprofile->unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$member = Profile::staticGet($user->id);
|
$member = Profile::staticGet($user->id);
|
||||||
|
|
||||||
$act = new Activity();
|
$act = new Activity();
|
||||||
|
Loading…
Reference in New Issue
Block a user