mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: 显示自身消息
This commit is contained in:
@@ -93,6 +93,9 @@ export class NapCatCore {
|
|||||||
msgListener.onRecvMsg = (msgs) => {
|
msgListener.onRecvMsg = (msgs) => {
|
||||||
msgs.forEach(msg => this.context.logger.logMessage(msg, this.selfInfo));
|
msgs.forEach(msg => this.context.logger.logMessage(msg, this.selfInfo));
|
||||||
};
|
};
|
||||||
|
msgListener.onAddSendMsg = (msg) => {
|
||||||
|
this.context.logger.logMessage(msg, this.selfInfo);
|
||||||
|
};
|
||||||
//await sleep(2500);
|
//await sleep(2500);
|
||||||
this.context.session.getMsgService().addKernelMsgListener(
|
this.context.session.getMsgService().addKernelMsgListener(
|
||||||
new this.context.wrapper.NodeIKernelMsgListener(proxiedListenerOf(msgListener, this.context.logger)),
|
new this.context.wrapper.NodeIKernelMsgListener(proxiedListenerOf(msgListener, this.context.logger)),
|
||||||
|
@@ -22,7 +22,6 @@ type Payload = FromSchema<typeof SchemaData>;
|
|||||||
export class FetchEmojiLike extends BaseAction<Payload, any> {
|
export class FetchEmojiLike extends BaseAction<Payload, any> {
|
||||||
actionName = ActionName.FetchEmojiLike;
|
actionName = ActionName.FetchEmojiLike;
|
||||||
PayloadSchema = SchemaData;
|
PayloadSchema = SchemaData;
|
||||||
|
|
||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
||||||
const NTQQMsgApi = this.CoreContext.apis.MsgApi;
|
const NTQQMsgApi = this.CoreContext.apis.MsgApi;
|
||||||
const msgIdPeer = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
|
const msgIdPeer = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
|
||||||
|
@@ -16,7 +16,6 @@ type Payload = FromSchema<typeof SchemaData>;
|
|||||||
export class GetCollectionList extends BaseAction<Payload, any> {
|
export class GetCollectionList extends BaseAction<Payload, any> {
|
||||||
actionName = ActionName.GetCollectionList;
|
actionName = ActionName.GetCollectionList;
|
||||||
PayloadSchema = SchemaData;
|
PayloadSchema = SchemaData;
|
||||||
|
|
||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
||||||
const NTQQCollectionApi = this.CoreContext.apis.CollectionApi;
|
const NTQQCollectionApi = this.CoreContext.apis.CollectionApi;
|
||||||
return await NTQQCollectionApi.getAllCollection(payload.category, payload.count);
|
return await NTQQCollectionApi.getAllCollection(payload.category, payload.count);
|
||||||
|
@@ -4,7 +4,6 @@ import { ActionName } from '../types';
|
|||||||
|
|
||||||
export class GetFriendWithCategory extends BaseAction<void, any> {
|
export class GetFriendWithCategory extends BaseAction<void, any> {
|
||||||
actionName = ActionName.GetFriendsWithCategory;
|
actionName = ActionName.GetFriendsWithCategory;
|
||||||
|
|
||||||
async _handle(payload: void) {
|
async _handle(payload: void) {
|
||||||
return (await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true)).map(category => ({
|
return (await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true)).map(category => ({
|
||||||
...category,
|
...category,
|
||||||
|
@@ -3,7 +3,6 @@ import { ActionName } from '../types';
|
|||||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||||
import { checkFileReceived, uri2local } from '@/common/utils/file';
|
import { checkFileReceived, uri2local } from '@/common/utils/file';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
|
Reference in New Issue
Block a user