@onyx-p/imlib-web 2.4.8 → 2.5.0

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.
package/index.esm.js CHANGED
@@ -29112,8 +29112,8 @@ async function send(message, sentArgs) {
29112
29112
  let postEncryptedString;
29113
29113
  let mediaAttribute;
29114
29114
  if (message.messageType === MessageTypes.TEXT) {
29115
- let content = message.content;
29116
- let textContent = message.content.content;
29115
+ let content = deepClone(message.content);
29116
+ let textContent = content.content;
29117
29117
  delete content.content;
29118
29118
  postEncryptedString = aes256Encrypt(textContent, secretKey);
29119
29119
  mediaAttribute = JSON.stringify(filterNullProperty(content));
@@ -29138,8 +29138,10 @@ async function send(message, sentArgs) {
29138
29138
  };
29139
29139
  if (isDef(message.content.mentionedInfo)) {
29140
29140
  const mentionedInfo = message.content.mentionedInfo;
29141
- if (mentionedInfo.type === MentionedType.ALL) ; else if (mentionedInfo.type === MentionedType.SINGAL && mentionedInfo.userIdList?.length) {
29142
- groupParams.at = mentionedInfo.userIdList.map(e => Long.fromString(e));
29141
+ if (mentionedInfo.userIdList?.length) {
29142
+ groupParams.at = mentionedInfo.userIdList.map(e => Long.fromString(e.uin));
29143
+ const mentionedDetail = JSON.stringify(mentionedInfo.userIdList);
29144
+ groupParams.msgPreContent = mentionedDetail;
29143
29145
  }
29144
29146
  }
29145
29147
  response = await sendGroupChatMessage(groupParams);
package/index.umd.js CHANGED
@@ -29118,8 +29118,8 @@
29118
29118
  let postEncryptedString;
29119
29119
  let mediaAttribute;
29120
29120
  if (message.messageType === MessageTypes.TEXT) {
29121
- let content = message.content;
29122
- let textContent = message.content.content;
29121
+ let content = deepClone(message.content);
29122
+ let textContent = content.content;
29123
29123
  delete content.content;
29124
29124
  postEncryptedString = aes256Encrypt(textContent, secretKey);
29125
29125
  mediaAttribute = JSON.stringify(filterNullProperty(content));
@@ -29144,8 +29144,10 @@
29144
29144
  };
29145
29145
  if (isDef(message.content.mentionedInfo)) {
29146
29146
  const mentionedInfo = message.content.mentionedInfo;
29147
- if (mentionedInfo.type === exports.MentionedType.ALL) ; else if (mentionedInfo.type === exports.MentionedType.SINGAL && mentionedInfo.userIdList?.length) {
29148
- groupParams.at = mentionedInfo.userIdList.map(e => Long.fromString(e));
29147
+ if (mentionedInfo.userIdList?.length) {
29148
+ groupParams.at = mentionedInfo.userIdList.map(e => Long.fromString(e.uin));
29149
+ const mentionedDetail = JSON.stringify(mentionedInfo.userIdList);
29150
+ groupParams.msgPreContent = mentionedDetail;
29149
29151
  }
29150
29152
  }
29151
29153
  response = await sendGroupChatMessage(groupParams);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onyx-p/imlib-web",
3
- "version": "2.4.8",
3
+ "version": "2.5.0",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
6
  "types": "types/index.d.ts",
@@ -1,9 +1,9 @@
1
- import { MentionedType } from './statusTypes';
2
1
  /**
3
2
  * 群组内的消息包含的 @ 数据
4
3
  */
5
4
  export default interface MentionedInfo {
6
- type?: MentionedType | undefined;
7
- userIdList?: string[] | undefined;
8
- mentionedContent?: string | undefined;
5
+ userIdList?: {
6
+ uin: string;
7
+ nickname: string;
8
+ }[] | undefined;
9
9
  }