From: Michael Date: Thu, 7 Dec 2023 12:03:53 +0000 (+0000) Subject: Bluesky: remove @ and spaces from the handle X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=50d8d44489e69fd0c9cb9cfeed7b32edd4d31520;p=friendica-addons.git Bluesky: remove @ and spaces from the handle --- diff --git a/bluesky/bluesky.php b/bluesky/bluesky.php index 1bbc6356..2f70ed74 100644 --- a/bluesky/bluesky.php +++ b/bluesky/bluesky.php @@ -402,7 +402,7 @@ function bluesky_settings_post(array &$b) $old_handle = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'handle'); $old_did = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'did'); - $handle = $_POST['bluesky_handle']; + $handle = trim($_POST['bluesky_handle'], ' @'); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'post', intval($_POST['bluesky'])); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'post_by_default', intval($_POST['bluesky_bydefault']));