diff --git a/src/MisuzuContext.php b/src/MisuzuContext.php index aa90aa5..0ee291f 100644 --- a/src/MisuzuContext.php +++ b/src/MisuzuContext.php @@ -269,7 +269,8 @@ class MisuzuContext { $this->authCtx, $this->emotes, $this->perms, - $this->authInfo + $this->authInfo, + $this->counters )); $routingCtx->register(new \Misuzu\Satori\SatoriRoutes( diff --git a/src/SharpChat/SharpChatRoutes.php b/src/SharpChat/SharpChatRoutes.php index cdf69e9..0641778 100644 --- a/src/SharpChat/SharpChatRoutes.php +++ b/src/SharpChat/SharpChatRoutes.php @@ -4,6 +4,7 @@ namespace Misuzu\SharpChat; use RuntimeException; use Misuzu\RoutingContext; use Misuzu\Auth\{AuthContext,AuthInfo,Sessions}; +use Misuzu\Counters\Counters; use Misuzu\Emoticons\Emotes; use Misuzu\Perms\Permissions; use Misuzu\Users\{Bans,UsersContext,UserInfo}; @@ -25,7 +26,8 @@ final class SharpChatRoutes implements RouteHandler { private AuthContext $authCtx, private Emotes $emotes, private Permissions $perms, - private AuthInfo $authInfo + private AuthInfo $authInfo, + private Counters $counters ) { $this->hashKey = $this->config->getString('hashKey', 'woomy'); } @@ -40,6 +42,8 @@ final class SharpChatRoutes implements RouteHandler { if($request->getMethod() === 'OPTIONS') return 204; + $this->counters->increment('dev:legacy_emotes_loads'); + $emotes = $this->emotes->getEmotes(orderBy: 'order'); $out = [];