mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
style: format
This commit is contained in:
parent
3024316b5b
commit
1765ffff7b
@ -59,7 +59,7 @@ export class OB11Constructor {
|
|||||||
ob11: { messagePostFormat },
|
ob11: { messagePostFormat },
|
||||||
} = config
|
} = config
|
||||||
const message_type = msg.chatType == ChatType.group ? 'group' : 'private'
|
const message_type = msg.chatType == ChatType.group ? 'group' : 'private'
|
||||||
let resMsg: OB11Message = {
|
const resMsg: OB11Message = {
|
||||||
self_id: parseInt(selfInfo.uin),
|
self_id: parseInt(selfInfo.uin),
|
||||||
user_id: parseInt(msg.senderUin),
|
user_id: parseInt(msg.senderUin),
|
||||||
time: parseInt(msg.msgTime) || Date.now(),
|
time: parseInt(msg.msgTime) || Date.now(),
|
||||||
@ -79,7 +79,7 @@ export class OB11Constructor {
|
|||||||
message_format: messagePostFormat === 'string' ? 'string' : 'array',
|
message_format: messagePostFormat === 'string' ? 'string' : 'array',
|
||||||
post_type: selfInfo.uin == msg.senderUin ? EventType.MESSAGE_SENT : EventType.MESSAGE,
|
post_type: selfInfo.uin == msg.senderUin ? EventType.MESSAGE_SENT : EventType.MESSAGE,
|
||||||
}
|
}
|
||||||
if (debug){
|
if (debug) {
|
||||||
resMsg.raw = msg
|
resMsg.raw = msg
|
||||||
}
|
}
|
||||||
if (msg.chatType == ChatType.group) {
|
if (msg.chatType == ChatType.group) {
|
||||||
@ -159,16 +159,16 @@ export class OB11Constructor {
|
|||||||
else if (element.picElement) {
|
else if (element.picElement) {
|
||||||
message_data['type'] = 'image'
|
message_data['type'] = 'image'
|
||||||
// message_data["data"]["file"] = element.picElement.sourcePath
|
// message_data["data"]["file"] = element.picElement.sourcePath
|
||||||
let fileName = element.picElement.fileName;
|
let fileName = element.picElement.fileName
|
||||||
const sourcePath = element.picElement.sourcePath;
|
const sourcePath = element.picElement.sourcePath
|
||||||
if (element.picElement.picType === PicType.gif && !fileName.endsWith('.gif')){
|
if (element.picElement.picType === PicType.gif && !fileName.endsWith('.gif')) {
|
||||||
fileName += ".gif";
|
fileName += '.gif'
|
||||||
}
|
}
|
||||||
message_data['data']['file'] = fileName
|
message_data['data']['file'] = fileName
|
||||||
// message_data["data"]["path"] = element.picElement.sourcePath
|
// message_data["data"]["path"] = element.picElement.sourcePath
|
||||||
// let currentRKey = "CAQSKAB6JWENi5LMk0kc62l8Pm3Jn1dsLZHyRLAnNmHGoZ3y_gDZPqZt-64"
|
// let currentRKey = "CAQSKAB6JWENi5LMk0kc62l8Pm3Jn1dsLZHyRLAnNmHGoZ3y_gDZPqZt-64"
|
||||||
|
|
||||||
message_data['data']['url'] = await NTQQFileApi.getImageUrl(element.picElement, msg.chatType);
|
message_data['data']['url'] = await NTQQFileApi.getImageUrl(element.picElement, msg.chatType)
|
||||||
// message_data["data"]["file_id"] = element.picElement.fileUuid
|
// message_data["data"]["file_id"] = element.picElement.fileUuid
|
||||||
message_data['data']['file_size'] = element.picElement.fileSize
|
message_data['data']['file_size'] = element.picElement.fileSize
|
||||||
dbUtil
|
dbUtil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user