Relay: Avoid empty tags / Always use the "relay account"

This commit is contained in:
Michael 2018-04-09 05:53:23 +00:00
commit 105f3ca747
2 changed files with 19 additions and 15 deletions

View file

@ -46,8 +46,10 @@ function wk_social_relay()
$server_tags = Config::get('system', 'relay_server_tags');
$tagitems = explode(",", $server_tags);
/// @todo Check if it was better to use "strtolower" on the tags
foreach ($tagitems AS $tag) {
$tags[trim($tag, "# ")] = trim($tag, "# ");
$tag = trim($tag, "# ");
$tags[$tag] = $tag;
}
if (Config::get('system', 'relay_user_tags')) {
@ -62,7 +64,9 @@ function wk_social_relay()
$taglist = [];
foreach ($tags AS $tag) {
$taglist[] = $tag;
if (!empty($tag)) {
$taglist[] = $tag;
}
}
$relay = [