function onStartNoticeDistribute($notice)
{
$profile = $notice->getProfile();
+
+ $isRemote = !(User::getKV('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)) {
*
* @return boolean hook value
*/
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$url = 'http://status.net/wiki/Plugin:ForceGroup';
$versions[] = array('name' => 'ForceGroup',
- 'version' => STATUSNET_VERSION,
+ 'version' => GNUSOCIAL_VERSION,
'author' => 'Brion Vibber',
'homepage' => $url,
'rawdescription' =>