mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: msg db cache missing shortId
This commit is contained in:
parent
f2854fdf00
commit
7e1dee8e07
@ -154,12 +154,12 @@ class DBUtil {
|
||||
this.updateMsg(msg).then()
|
||||
return existMsg.msgShortId
|
||||
}
|
||||
this.addCache(msg)
|
||||
|
||||
const shortMsgId = await this.genMsgShortId()
|
||||
const shortIdKey = this.DB_KEY_PREFIX_MSG_SHORT_ID + shortMsgId
|
||||
const seqIdKey = this.DB_KEY_PREFIX_MSG_SEQ_ID + msg.msgSeq
|
||||
msg.msgShortId = shortMsgId
|
||||
this.addCache(msg)
|
||||
// log("新增消息记录", msg.msgId)
|
||||
this.db.put(shortIdKey, msg.msgId).then().catch()
|
||||
this.db.put(longIdKey, JSON.stringify(msg)).then().catch()
|
||||
|
@ -225,7 +225,8 @@ export class NTQQFileApi {
|
||||
// 老的图片url,不需要rkey
|
||||
return IMAGE_HTTP_HOST + url
|
||||
}
|
||||
} else if (fileMd5 || md5HexStr) {
|
||||
}
|
||||
else if (fileMd5 || md5HexStr) {
|
||||
// 没有url,需要自己拼接
|
||||
return `${IMAGE_HTTP_HOST}/gchatpic_new/0/0-0-${(fileMd5 || md5HexStr)!.toUpperCase()}/0`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user