We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 9844ec76 authored by Joshua Judson Rosen's avatar Joshua Judson Rosen Committed by mattl

Make the ForceGroup plugin work consistently for notices from remote users.

parent 8e5d58fe
......@@ -52,6 +52,24 @@ class ForceGroupPlugin extends Plugin
function onStartNoticeDistribute($notice)
{
$profile = $notice->getProfile();
$isRemote = !(User::staticGet('id', $profile->id));
if ($isRemote) {
/*
* Notices from remote users on other sites
* will normally not end up here unless they're
* specifically directed here, e.g.: via explicit
* post to a remote (to them) group. But remote
* notices can also be `pulled in' as a result of
* local users subscribing to the remote user;
* from the remote user's perspective, this results
* in group-forcing appearing effectively random.
* So let's be consistent, and just never force
* incoming remote notices into a ForceGroup:
*/
return true;
}
foreach ($this->post as $nickname) {
$group = User_group::getForNickname($nickname);
if ($group && $profile->isMember($group)) {
......
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