]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
mentions from OStatus lookup were missing a 'type' attribute in common_linkify_mention
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 23 Feb 2014 20:49:55 +0000 (21:49 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 23 Feb 2014 20:49:55 +0000 (21:49 +0100)
plugins/OStatus/OStatusPlugin.php

index c6c413873e8d198405b499c703df3e300ac7142f..75d4fb74bc0f191aee973f5d643326ea8802482f 100644 (file)
@@ -332,7 +332,7 @@ class OStatusPlugin extends Plugin
      * Find any explicit remote mentions. Accepted forms:
      *   Webfinger: @user@example.com
      *   Profile link: @example.com/mublog/user
-     * @param Profile $sender (os user?)
+     * @param Profile $sender
      * @param string $text input markup text
      * @param array &$mention in/out param: set of found mentions
      * @return boolean hook return value
@@ -354,6 +354,7 @@ class OStatusPlugin extends Plugin
                     if ($oprofile && !$oprofile->isGroup()) {
                         $profile = $oprofile->localProfile();
                         $matches[$pos] = array('mentioned' => array($profile),
+                                               'type' => 'mention',
                                                'text' => $target,
                                                'position' => $pos,
                                                'url' => $profile->profileurl);
@@ -380,6 +381,7 @@ class OStatusPlugin extends Plugin
                         if ($oprofile && !$oprofile->isGroup()) {
                             $profile = $oprofile->localProfile();
                             $matches[$pos] = array('mentioned' => array($profile),
+                                                   'type' => 'mention',
                                                    'text' => $target,
                                                    'position' => $pos,
                                                    'url' => $profile->profileurl);