]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
default to #addtag on !group mention
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 2 May 2017 19:12:17 +0000 (21:12 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 2 May 2017 19:21:53 +0000 (21:21 +0200)
classes/Notice.php
lib/default.php

index bfe9f1c7f63811b212f63e9ecf7f50181ad108d2..a5bd4451ecbfe8aa7c9f620ea74967366f51e98f 100644 (file)
@@ -1583,12 +1583,12 @@ class Notice extends Managed_DataObject
 
                 if (common_config('group', 'addtag')) {
                     // we automatically add a tag for every group name, too
-
-                    $tag = Notice_tag::pkeyGet(array('tag' => common_canonical_tag($group->nickname),
-                                                     'notice_id' => $this->id));
+                    common_debug('Adding hashtag matching group nickname: '._ve($group->getNickname()));
+                    $tag = Notice_tag::pkeyGet(array('tag' => common_canonical_tag($group->getNickname()),
+                                                     'notice_id' => $this->getID()));
 
                     if (is_null($tag)) {
-                        $this->saveTag($group->nickname);
+                        $this->saveTag($group->getNickname());
                     }
                 }
 
index 83dc58f898fac9d9f52146e72d03235d5fdba79e..90bca32c4f4aeaba7e50041a8e3134d15196a412 100644 (file)
@@ -297,7 +297,7 @@ $default =
         'group' =>
         array('maxaliases' => 3,
               'desclimit' => null,
-              'addtag' => false),
+              'addtag' => true),
         'peopletag' =>
         array('maxtags' => 100, // maximum number of tags a user can create.
               'maxpeople' => 500, // maximum no. of people with the same tag by the same user