+ /**
+ * Get a list of subscribed tags by both the users and the tags that are defined by the admin
+ *
+ * @return array
+ */
+ public static function getSubscribedTags(): array
+ {
+ $systemTags = [];
+ $server_tags = DI::config()->get('system', 'relay_server_tags');
+
+ foreach (explode(',', mb_strtolower($server_tags)) as $tag) {
+ $systemTags[] = trim($tag, '# ');
+ }
+
+ if (DI::config()->get('system', 'relay_user_tags')) {
+ $userTags = Search::getUserTags();
+ } else {
+ $userTags = [];
+ }
+
+ return array_unique(array_merge($systemTags, $userTags));
+ }
+