diff --git a/src/common/db.ts b/src/common/db.ts index 0b80b2b..029e979 100644 --- a/src/common/db.ts +++ b/src/common/db.ts @@ -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() diff --git a/src/ntqqapi/api/file.ts b/src/ntqqapi/api/file.ts index b54527c..b376d51 100644 --- a/src/ntqqapi/api/file.ts +++ b/src/ntqqapi/api/file.ts @@ -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` }