Fixed emotes not displaying on insecure connections and use new API endpoint.
This commit is contained in:
parent
359303e515
commit
4c39933e8d
1 changed files with 4 additions and 4 deletions
|
@ -129,12 +129,12 @@ if(!empty($_GET['common'])) {
|
|||
if(isset($soundInfo->sources->mp3))
|
||||
$config['soundFiles'][strtr($soundInfo->name, [':' => '_', '-' => '_'])] = $soundInfo->sources->mp3;
|
||||
|
||||
$emotesUrl = 'https:' . $common->emotes;
|
||||
$emotesUrl = 'https:' . $common->api . '/v1/emotes';
|
||||
$emotes = json_decode(file_get_contents($emotesUrl));
|
||||
foreach($emotes as $emoteInfo)
|
||||
if($emoteInfo->Hierarchy < 1) {
|
||||
$config['emoticonCodes'][] = $emoteInfo->Text[0];
|
||||
$config['emoticonFiles'][] = $emoteInfo->Image;
|
||||
if(empty($emoteInfo->min_rank)) {
|
||||
$config['emoticonCodes'][] = sprintf(':%s:', $emoteInfo->strings[0]);
|
||||
$config['emoticonFiles'][] = str_starts_with($emoteInfo->url, 'https:') ? substr($emoteInfo->url, 6) : $emoteInfo->url;
|
||||
}
|
||||
|
||||
header('Content-Type: application/javascript; charset=utf-8');
|
||||
|
|
Loading…
Reference in a new issue