node-karin 0.12.22 → 0.12.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,8 +156,8 @@ export class OB11Event {
156
156
  group_id: groupId,
157
157
  operator_uid: (data.operator_id + '') || '',
158
158
  operator_uin: (data.operator_id + '') || '',
159
- target_uid: data.user_id || '',
160
- target_uin: data.user_id || '',
159
+ target_uid: (data.user_id + '') || '',
160
+ target_uin: (data.user_id + '') || '',
161
161
  type: data.sub_type,
162
162
  };
163
163
  const options = {
@@ -208,8 +208,8 @@ export class OB11Event {
208
208
  group_id: groupId,
209
209
  operator_uid: (data.operator_id + '') || '',
210
210
  operator_uin: (data.operator_id + '') || '',
211
- target_uid: data.user_id || '',
212
- target_uin: data.user_id || '',
211
+ target_uid: (data.user_id + '') || '',
212
+ target_uin: (data.user_id + '') || '',
213
213
  duration: data.duration,
214
214
  type: data.sub_type,
215
215
  };
@@ -254,8 +254,8 @@ export class OB11Event {
254
254
  group_id: groupId,
255
255
  operator_uid: (data.operator_id + '') || '',
256
256
  operator_uin: (data.operator_id + '') || '',
257
- target_uid: data.user_id || '',
258
- target_uin: data.user_id || '',
257
+ target_uid: (data.user_id + '') || '',
258
+ target_uin: (data.user_id + '') || '',
259
259
  message_id: data.message_id,
260
260
  tip_text: '撤回了一条消息',
261
261
  };
@@ -1,3 +1,4 @@
1
+ import lodash from 'lodash';
1
2
  import { listener, pluginLoader } from '../../core/index.js';
2
3
  import { review } from './review.js';
3
4
  import { segment, common, logger, config } from '../../utils/index.js';
@@ -151,7 +152,8 @@ export class EventBaseHandler {
151
152
  message.unshift(segment.reply(this.e.message_id));
152
153
  /** 先发 提升速度 */
153
154
  const result = this.e.replyCallback(message, retry_count);
154
- const ReplyLog = common.makeMessageLog(message);
155
+ /** 限制长度为500 */
156
+ const ReplyLog = lodash.truncate(common.makeMessageLog(message), { length: 500 });
155
157
  if (this.e.isGroup) {
156
158
  review.GroupMsgPrint(this.e) && logger.bot('info', this.e.self_id, `${logger.green(`Send Group ${this.e.group_id}: `)}${ReplyLog.replace(/\n/g, '\\n')}`);
157
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.12.22",
3
+ "version": "0.12.24",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",