mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
Bind TypedEventEmitter to DI container and update usage
Added TypedEventEmitter to the dependency injection container and exposed it in ServiceBase. Updated OlPushService to use the injected event emitter instead of directly importing appEvent. Also performed minor code style improvements for consistency.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { NapProtoMsg } from "napcat-protobuf";
|
||||
import { appEvent } from "../packet/handler/eventList";
|
||||
import { ReceiveService, ServiceBase } from "../packet/handler/serviceRegister";
|
||||
import { GroupReactNotify, PushMsg } from "../packet/transformer/proto";
|
||||
|
||||
@@ -23,7 +22,7 @@ export class OlPushService extends ServiceBase {
|
||||
const code = notify.groupReactionData?.data?.data?.groupReactionDataContent?.code ?? '';
|
||||
const count = notify.groupReactionData?.data?.data?.groupReactionDataContent?.count ?? 0;
|
||||
const senderUin = await this.core.apis.UserApi.getUinByUidV2(operatorUid);
|
||||
appEvent.emit('event:emoji_like', {
|
||||
this.event.emit('event:emoji_like', {
|
||||
groupId: groupCode,
|
||||
senderUin: senderUin,
|
||||
emojiId: code,
|
||||
|
||||
Reference in New Issue
Block a user