]> git.mxchange.org Git - friendica.git/blobdiff - mod/oexchange.php
Store the source of incoming posts
[friendica.git] / mod / oexchange.php
index 4eb25a2ab72c0269e8997ee96764c985b992bba8..dd3809bc7d795889daa5ea8f2984ce64bb2f937f 100644 (file)
@@ -20,6 +20,8 @@
  */
 
 use Friendica\App;
+use Friendica\Content\Text\BBCode;
+use Friendica\Content\Text\HTML;
 use Friendica\Core\System;
 use Friendica\DI;
 use Friendica\Module\Response;
@@ -95,7 +97,7 @@ function oexchange_init(App $a)
 
 function oexchange_content(App $a)
 {
-       if (!local_user()) {
+       if (!DI::userSession()->getLocalUserId()) {
                $o = Login::form();
                return $o;
        }
@@ -117,7 +119,7 @@ function oexchange_content(App $a)
 
        $post = [];
 
-       $post['profile_uid'] = local_user();
+       $post['profile_uid'] = DI::userSession()->getLocalUserId();
        $post['return'] = '/oexchange/done';
        $post['body'] = HTML::toBBCode($s);