Fixed emoticons not loading.
This commit is contained in:
parent
3909b85b59
commit
fabc4c7059
1 changed files with 2 additions and 2 deletions
|
@ -135,12 +135,12 @@ if(!empty($_GET['common'])) {
|
||||||
if(isset($soundInfo->sources->mp3))
|
if(isset($soundInfo->sources->mp3))
|
||||||
$config['soundFiles'][strtr($soundInfo->name, [':' => '_', '-' => '_'])] = $soundInfo->sources->mp3;
|
$config['soundFiles'][strtr($soundInfo->name, [':' => '_', '-' => '_'])] = $soundInfo->sources->mp3;
|
||||||
|
|
||||||
$emotesUrl = 'https:' . $common->api . '/v1/emotes';
|
$emotesUrl = 'https:' . $common->api . '/v1/emotes?fields=strings,uri,min_rank';
|
||||||
$emotes = json_decode(file_get_contents($emotesUrl));
|
$emotes = json_decode(file_get_contents($emotesUrl));
|
||||||
foreach($emotes as $emoteInfo)
|
foreach($emotes as $emoteInfo)
|
||||||
if(empty($emoteInfo->min_rank)) {
|
if(empty($emoteInfo->min_rank)) {
|
||||||
$config['emoticonCodes'][] = sprintf(':%s:', $emoteInfo->strings[0]);
|
$config['emoticonCodes'][] = sprintf(':%s:', $emoteInfo->strings[0]);
|
||||||
$config['emoticonFiles'][] = str_starts_with($emoteInfo->url, 'https:') ? substr($emoteInfo->url, 6) : $emoteInfo->url;
|
$config['emoticonFiles'][] = str_starts_with($emoteInfo->uri, 'https:') ? substr($emoteInfo->uri, 6) : $emoteInfo->uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-Type: application/javascript; charset=utf-8');
|
header('Content-Type: application/javascript; charset=utf-8');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue