Only use posts with wanted languages for subscribed tags

This commit is contained in:
Michael 2023-12-11 22:07:01 +00:00
parent 541208a6bd
commit 14266a1ca4
4 changed files with 34 additions and 5 deletions

View file

@ -575,6 +575,17 @@ class User
return DI::l10n()->toISO6391(DI::config()->get('system', 'language'));
}
/**
* Fetch the wanted languages for a given user
*
* @param integer $uid
* @return array
*/
public static function getWantedLanguages(int $uid): array
{
return DI::pConfig()->get($uid, 'channel', 'languages', [User::getLanguageCode($uid)]) ?? [];
}
/**
* Get a list of all languages that are used by the users
*