update: laana version to v0.5.0

This commit is contained in:
Wesley F. Young 2024-10-13 15:10:57 +08:00
parent 9427cb4688
commit 1eef3a6a7d
3 changed files with 5 additions and 5 deletions

View File

@ -47,7 +47,7 @@
"vite-tsconfig-paths": "^4.3.2"
},
"dependencies": {
"@laana-proto/def": "^0.3.2",
"@laana-proto/def": "^0.5.0",
"express": "5.0.0",
"fluent-ffmpeg": "^2.1.2",
"log4js": "^6.9.1",

View File

@ -160,7 +160,7 @@ export class LaanaMessageActionImpl {
* @param refId The Laana-styled refId of the message.
*/
async getForwardedMessages(refId: string) {
const { rootMsgLaanaId, currentMsgId } = this.laana.utils.msg.decodeLaanaForwardMsgRefId(refId);
const { rootMsgLaanaId, currentMsgId } = this.laana.utils.msg.decodeLaanaForwardedMsgRefId(refId);
const decodedRootMsgId = this.laana.utils.msg.decodeLaanaMsgId(rootMsgLaanaId);
const rawForwardedMessages = await this.core.apis.MsgApi.getMultiMsg(
{

View File

@ -508,8 +508,8 @@ export class LaanaMessageUtils {
};
} else if (firstElement.multiForwardMsgElement) {
return {
oneofKind: 'forwardMsgRef',
forwardMsgRef: {
oneofKind: 'forwardedMsgRef',
forwardedMsgRef: {
refId: this.encodeMsgToForwardMsgRefId(
rootForwardMsgId ?? this.encodeMsgToLaanaMsgId(msg.msgId, msg.chatType, msg.peerUid),
msg.msgId,
@ -559,7 +559,7 @@ export class LaanaMessageUtils {
return `LaanaForwardMsgRefId|${rootMsgLaanaId}|${currentMsgId}`;
}
decodeLaanaForwardMsgRefId(laanaForwardMsgId: string) {
decodeLaanaForwardedMsgRefId(laanaForwardMsgId: string) {
if (!laanaForwardMsgId.startsWith('LaanaForwardMsgRefId|')) {
throw Error('不合法的 LaanaForwardMsgRefId');
}