mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9284fc7e8a | ||
![]() |
ceb063143a | ||
![]() |
ed55a5a54c | ||
![]() |
2c4fdbfa6a | ||
![]() |
1132495eb3 | ||
![]() |
2ac2c68435 | ||
![]() |
6477366ba6 |
@@ -4,7 +4,7 @@
|
||||
"name": "LLOneBot",
|
||||
"slug": "LLOneBot",
|
||||
"description": "实现 OneBot 11 协议,用于 QQ 机器人开发",
|
||||
"version": "3.32.3",
|
||||
"version": "3.32.4",
|
||||
"icon": "./icon.webp",
|
||||
"authors": [
|
||||
{
|
||||
|
@@ -12,7 +12,7 @@
|
||||
"deploy-win": "cmd /c \"xcopy /C /S /Y dist\\* %LITELOADERQQNT_PROFILE%\\plugins\\LLOneBot\\\"",
|
||||
"format": "prettier -cw .",
|
||||
"check": "tsc",
|
||||
"compile:proto": "pbjs -t static-module -w es6 -p ./src/ntqqapi/proto -o ./src/ntqqapi/proto/compiled.js systemMessage.proto profileLikeTip.proto && pbts -o ./src/ntqqapi/proto/compiled.d.ts ./src/ntqqapi/proto/compiled.js"
|
||||
"compile:proto": "pbjs --no-convert --no-encode --no-verify -t static-module -w es6 -p src/ntqqapi/proto -o src/ntqqapi/proto/compiled.js systemMessage.proto profileLikeTip.proto && pbts -o src/ntqqapi/proto/compiled.d.ts src/ntqqapi/proto/compiled.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
|
@@ -5,20 +5,22 @@ import { version } from '../../version'
|
||||
import { copyFolder, log, fetchFile } from '.'
|
||||
import { PLUGIN_DIR, TEMP_DIR } from '../globalVars'
|
||||
|
||||
const downloadMirrorHosts = ['https://mirror.ghproxy.com/']
|
||||
const checkVersionMirrorHosts = ['https://kkgithub.com']
|
||||
const downloadMirrorHosts = ['https://ghp.ci/']
|
||||
const releasesMirrorHosts = ['https://kkgithub.com']
|
||||
|
||||
export async function checkNewVersion() {
|
||||
const latestVersionText = await getRemoteVersion()
|
||||
const latestVersion = latestVersionText.split('.')
|
||||
//log('llonebot last version', latestVersion)
|
||||
const currentVersion: string[] = version.split('.')
|
||||
log('LLOneBot latest version', latestVersion)
|
||||
const currentVersion = version.split('.')
|
||||
//log('llonebot current version', currentVersion)
|
||||
for (const k of [0, 1, 2]) {
|
||||
if (parseInt(latestVersion[k]) > parseInt(currentVersion[k])) {
|
||||
const latest = parseInt(latestVersion[k])
|
||||
const current = parseInt(currentVersion[k])
|
||||
if (latest > current) {
|
||||
log('')
|
||||
return { result: true, version: latestVersionText }
|
||||
} else if (parseInt(latestVersion[k]) < parseInt(currentVersion[k])) {
|
||||
} else if (latest < current) {
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -28,7 +30,7 @@ export async function checkNewVersion() {
|
||||
export async function upgradeLLOneBot() {
|
||||
const latestVersion = await getRemoteVersion()
|
||||
if (latestVersion && latestVersion != '') {
|
||||
const downloadUrl = 'https://github.com/LLOneBot/LLOneBot/releases/download/v' + latestVersion + '/LLOneBot.zip'
|
||||
const downloadUrl = `https://github.com/LLOneBot/LLOneBot/releases/download/v${latestVersion}/LLOneBot.zip`
|
||||
const filePath = path.join(TEMP_DIR, './update-' + latestVersion + '.zip')
|
||||
let downloadSuccess = false
|
||||
// 多镜像下载
|
||||
@@ -73,26 +75,34 @@ export async function upgradeLLOneBot() {
|
||||
}
|
||||
|
||||
export async function getRemoteVersion() {
|
||||
let Version = ''
|
||||
for (let i = 0; i < checkVersionMirrorHosts.length; i++) {
|
||||
const mirrorGithub = checkVersionMirrorHosts[i]
|
||||
const tVersion = await getRemoteVersionByMirror(mirrorGithub)
|
||||
if (tVersion && tVersion != '') {
|
||||
Version = tVersion
|
||||
break
|
||||
for (const mirror of releasesMirrorHosts) {
|
||||
const version = await getRemoteVersionByReleasesMirror(mirror)
|
||||
if (version) {
|
||||
return version
|
||||
}
|
||||
}
|
||||
for (const mirror of downloadMirrorHosts) {
|
||||
const version = await getRemoteVersionByDownloadMirror(mirror)
|
||||
if (version) {
|
||||
return version
|
||||
}
|
||||
}
|
||||
return Version
|
||||
}
|
||||
|
||||
export async function getRemoteVersionByMirror(mirrorGithub: string) {
|
||||
let releasePage = 'error'
|
||||
|
||||
try {
|
||||
releasePage = (await fetchFile(mirrorGithub + '/LLOneBot/LLOneBot/releases')).data.toString()
|
||||
// log("releasePage", releasePage);
|
||||
if (releasePage === 'error') return ''
|
||||
return releasePage.match(new RegExp('(?<=(tag/v)).*?(?=("))'))?.[0]
|
||||
} catch { }
|
||||
return ''
|
||||
}
|
||||
|
||||
export async function getRemoteVersionByDownloadMirror(mirrorGithub: string) {
|
||||
try {
|
||||
const source = 'https://raw.githubusercontent.com/LLOneBot/LLOneBot/main/src/version.ts'
|
||||
const page = (await fetchFile(mirrorGithub + source)).data.toString()
|
||||
return page.match(/(\d+\.\d+\.\d+)/)?.[0]
|
||||
} catch (e) {
|
||||
log(e?.toString())
|
||||
}
|
||||
}
|
||||
|
||||
export async function getRemoteVersionByReleasesMirror(mirrorGithub: string) {
|
||||
try {
|
||||
const page = (await fetchFile(mirrorGithub + '/LLOneBot/LLOneBot/releases')).data.toString()
|
||||
return page.match(new RegExp('(?<=(tag/v)).*?(?=("))'))?.[0]
|
||||
} catch { }
|
||||
}
|
||||
|
308
src/ntqqapi/proto/compiled.d.ts
vendored
308
src/ntqqapi/proto/compiled.d.ts
vendored
@@ -41,22 +41,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static create(properties?: SysMsg.ISystemMessage): SysMsg.SystemMessage;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessage message. Does not implicitly {@link SysMsg.SystemMessage.verify|verify} messages.
|
||||
* @param message SystemMessage message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: SysMsg.ISystemMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link SysMsg.SystemMessage.verify|verify} messages.
|
||||
* @param message SystemMessage message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: SysMsg.ISystemMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessage message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
@@ -76,34 +60,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SysMsg.SystemMessage;
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessage message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a SystemMessage message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns SystemMessage
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): SysMsg.SystemMessage;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessage message. Also converts values to other types if specified.
|
||||
* @param message SystemMessage
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: SysMsg.SystemMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this SystemMessage to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessage
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
@@ -156,22 +112,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static create(properties?: SysMsg.ISystemMessageHeader): SysMsg.SystemMessageHeader;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageHeader message. Does not implicitly {@link SysMsg.SystemMessageHeader.verify|verify} messages.
|
||||
* @param message SystemMessageHeader message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: SysMsg.ISystemMessageHeader, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageHeader message, length delimited. Does not implicitly {@link SysMsg.SystemMessageHeader.verify|verify} messages.
|
||||
* @param message SystemMessageHeader message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: SysMsg.ISystemMessageHeader, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessageHeader message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
@@ -191,34 +131,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SysMsg.SystemMessageHeader;
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessageHeader message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a SystemMessageHeader message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns SystemMessageHeader
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): SysMsg.SystemMessageHeader;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessageHeader message. Also converts values to other types if specified.
|
||||
* @param message SystemMessageHeader
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: SysMsg.SystemMessageHeader, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this SystemMessageHeader to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessageHeader
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
@@ -283,22 +195,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static create(properties?: SysMsg.ISystemMessageMsgSpec): SysMsg.SystemMessageMsgSpec;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageMsgSpec message. Does not implicitly {@link SysMsg.SystemMessageMsgSpec.verify|verify} messages.
|
||||
* @param message SystemMessageMsgSpec message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: SysMsg.ISystemMessageMsgSpec, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageMsgSpec message, length delimited. Does not implicitly {@link SysMsg.SystemMessageMsgSpec.verify|verify} messages.
|
||||
* @param message SystemMessageMsgSpec message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: SysMsg.ISystemMessageMsgSpec, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessageMsgSpec message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
@@ -318,34 +214,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SysMsg.SystemMessageMsgSpec;
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessageMsgSpec message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a SystemMessageMsgSpec message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns SystemMessageMsgSpec
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): SysMsg.SystemMessageMsgSpec;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessageMsgSpec message. Also converts values to other types if specified.
|
||||
* @param message SystemMessageMsgSpec
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: SysMsg.SystemMessageMsgSpec, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this SystemMessageMsgSpec to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessageMsgSpec
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
@@ -380,22 +248,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static create(properties?: SysMsg.ISystemMessageBodyWrapper): SysMsg.SystemMessageBodyWrapper;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageBodyWrapper message. Does not implicitly {@link SysMsg.SystemMessageBodyWrapper.verify|verify} messages.
|
||||
* @param message SystemMessageBodyWrapper message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: SysMsg.ISystemMessageBodyWrapper, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageBodyWrapper message, length delimited. Does not implicitly {@link SysMsg.SystemMessageBodyWrapper.verify|verify} messages.
|
||||
* @param message SystemMessageBodyWrapper message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: SysMsg.ISystemMessageBodyWrapper, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessageBodyWrapper message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
@@ -415,34 +267,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SysMsg.SystemMessageBodyWrapper;
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessageBodyWrapper message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a SystemMessageBodyWrapper message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns SystemMessageBodyWrapper
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): SysMsg.SystemMessageBodyWrapper;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessageBodyWrapper message. Also converts values to other types if specified.
|
||||
* @param message SystemMessageBodyWrapper
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: SysMsg.SystemMessageBodyWrapper, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this SystemMessageBodyWrapper to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessageBodyWrapper
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
@@ -489,22 +313,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static create(properties?: SysMsg.ILikeDetail): SysMsg.LikeDetail;
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeDetail message. Does not implicitly {@link SysMsg.LikeDetail.verify|verify} messages.
|
||||
* @param message LikeDetail message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: SysMsg.ILikeDetail, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeDetail message, length delimited. Does not implicitly {@link SysMsg.LikeDetail.verify|verify} messages.
|
||||
* @param message LikeDetail message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: SysMsg.ILikeDetail, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a LikeDetail message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
@@ -524,34 +332,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SysMsg.LikeDetail;
|
||||
|
||||
/**
|
||||
* Verifies a LikeDetail message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a LikeDetail message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns LikeDetail
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): SysMsg.LikeDetail;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a LikeDetail message. Also converts values to other types if specified.
|
||||
* @param message LikeDetail
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: SysMsg.LikeDetail, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this LikeDetail to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Gets the default type url for LikeDetail
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
@@ -598,22 +378,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static create(properties?: SysMsg.ILikeMsg): SysMsg.LikeMsg;
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeMsg message. Does not implicitly {@link SysMsg.LikeMsg.verify|verify} messages.
|
||||
* @param message LikeMsg message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: SysMsg.ILikeMsg, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeMsg message, length delimited. Does not implicitly {@link SysMsg.LikeMsg.verify|verify} messages.
|
||||
* @param message LikeMsg message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: SysMsg.ILikeMsg, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a LikeMsg message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
@@ -633,34 +397,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SysMsg.LikeMsg;
|
||||
|
||||
/**
|
||||
* Verifies a LikeMsg message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a LikeMsg message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns LikeMsg
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): SysMsg.LikeMsg;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a LikeMsg message. Also converts values to other types if specified.
|
||||
* @param message LikeMsg
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: SysMsg.LikeMsg, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this LikeMsg to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Gets the default type url for LikeMsg
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
@@ -695,22 +431,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static create(properties?: SysMsg.IProfileLikeTip): SysMsg.ProfileLikeTip;
|
||||
|
||||
/**
|
||||
* Encodes the specified ProfileLikeTip message. Does not implicitly {@link SysMsg.ProfileLikeTip.verify|verify} messages.
|
||||
* @param message ProfileLikeTip message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: SysMsg.IProfileLikeTip, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified ProfileLikeTip message, length delimited. Does not implicitly {@link SysMsg.ProfileLikeTip.verify|verify} messages.
|
||||
* @param message ProfileLikeTip message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: SysMsg.IProfileLikeTip, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a ProfileLikeTip message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
@@ -730,34 +450,6 @@ export namespace SysMsg {
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SysMsg.ProfileLikeTip;
|
||||
|
||||
/**
|
||||
* Verifies a ProfileLikeTip message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a ProfileLikeTip message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns ProfileLikeTip
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): SysMsg.ProfileLikeTip;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a ProfileLikeTip message. Also converts values to other types if specified.
|
||||
* @param message ProfileLikeTip
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: SysMsg.ProfileLikeTip, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this ProfileLikeTip to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Gets the default type url for ProfileLikeTip
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
|
@@ -2,7 +2,7 @@
|
||||
import * as $protobuf from "protobufjs/minimal";
|
||||
|
||||
// Common aliases
|
||||
const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
||||
const $Reader = $protobuf.Reader, $util = $protobuf.util;
|
||||
|
||||
// Exported root namespace
|
||||
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
||||
@@ -80,42 +80,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return new SystemMessage(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessage message. Does not implicitly {@link SysMsg.SystemMessage.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof SysMsg.SystemMessage
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessage} message SystemMessage message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessage.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.header != null && message.header.length)
|
||||
for (let i = 0; i < message.header.length; ++i)
|
||||
$root.SysMsg.SystemMessageHeader.encode(message.header[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
||||
if (message.msgSpec != null && message.msgSpec.length)
|
||||
for (let i = 0; i < message.msgSpec.length; ++i)
|
||||
$root.SysMsg.SystemMessageMsgSpec.encode(message.msgSpec[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
||||
if (message.bodyWrapper != null && Object.hasOwnProperty.call(message, "bodyWrapper"))
|
||||
$root.SysMsg.SystemMessageBodyWrapper.encode(message.bodyWrapper, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link SysMsg.SystemMessage.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof SysMsg.SystemMessage
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessage} message SystemMessage message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessage.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessage message from the specified reader or buffer.
|
||||
* @function decode
|
||||
@@ -174,128 +138,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessage message.
|
||||
* @function verify
|
||||
* @memberof SysMsg.SystemMessage
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
SystemMessage.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.header != null && message.hasOwnProperty("header")) {
|
||||
if (!Array.isArray(message.header))
|
||||
return "header: array expected";
|
||||
for (let i = 0; i < message.header.length; ++i) {
|
||||
let error = $root.SysMsg.SystemMessageHeader.verify(message.header[i]);
|
||||
if (error)
|
||||
return "header." + error;
|
||||
}
|
||||
}
|
||||
if (message.msgSpec != null && message.hasOwnProperty("msgSpec")) {
|
||||
if (!Array.isArray(message.msgSpec))
|
||||
return "msgSpec: array expected";
|
||||
for (let i = 0; i < message.msgSpec.length; ++i) {
|
||||
let error = $root.SysMsg.SystemMessageMsgSpec.verify(message.msgSpec[i]);
|
||||
if (error)
|
||||
return "msgSpec." + error;
|
||||
}
|
||||
}
|
||||
if (message.bodyWrapper != null && message.hasOwnProperty("bodyWrapper")) {
|
||||
let error = $root.SysMsg.SystemMessageBodyWrapper.verify(message.bodyWrapper);
|
||||
if (error)
|
||||
return "bodyWrapper." + error;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a SystemMessage message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof SysMsg.SystemMessage
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {SysMsg.SystemMessage} SystemMessage
|
||||
*/
|
||||
SystemMessage.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.SysMsg.SystemMessage)
|
||||
return object;
|
||||
let message = new $root.SysMsg.SystemMessage();
|
||||
if (object.header) {
|
||||
if (!Array.isArray(object.header))
|
||||
throw TypeError(".SysMsg.SystemMessage.header: array expected");
|
||||
message.header = [];
|
||||
for (let i = 0; i < object.header.length; ++i) {
|
||||
if (typeof object.header[i] !== "object")
|
||||
throw TypeError(".SysMsg.SystemMessage.header: object expected");
|
||||
message.header[i] = $root.SysMsg.SystemMessageHeader.fromObject(object.header[i]);
|
||||
}
|
||||
}
|
||||
if (object.msgSpec) {
|
||||
if (!Array.isArray(object.msgSpec))
|
||||
throw TypeError(".SysMsg.SystemMessage.msgSpec: array expected");
|
||||
message.msgSpec = [];
|
||||
for (let i = 0; i < object.msgSpec.length; ++i) {
|
||||
if (typeof object.msgSpec[i] !== "object")
|
||||
throw TypeError(".SysMsg.SystemMessage.msgSpec: object expected");
|
||||
message.msgSpec[i] = $root.SysMsg.SystemMessageMsgSpec.fromObject(object.msgSpec[i]);
|
||||
}
|
||||
}
|
||||
if (object.bodyWrapper != null) {
|
||||
if (typeof object.bodyWrapper !== "object")
|
||||
throw TypeError(".SysMsg.SystemMessage.bodyWrapper: object expected");
|
||||
message.bodyWrapper = $root.SysMsg.SystemMessageBodyWrapper.fromObject(object.bodyWrapper);
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessage message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof SysMsg.SystemMessage
|
||||
* @static
|
||||
* @param {SysMsg.SystemMessage} message SystemMessage
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
SystemMessage.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
let object = {};
|
||||
if (options.arrays || options.defaults) {
|
||||
object.header = [];
|
||||
object.msgSpec = [];
|
||||
}
|
||||
if (options.defaults)
|
||||
object.bodyWrapper = null;
|
||||
if (message.header && message.header.length) {
|
||||
object.header = [];
|
||||
for (let j = 0; j < message.header.length; ++j)
|
||||
object.header[j] = $root.SysMsg.SystemMessageHeader.toObject(message.header[j], options);
|
||||
}
|
||||
if (message.msgSpec && message.msgSpec.length) {
|
||||
object.msgSpec = [];
|
||||
for (let j = 0; j < message.msgSpec.length; ++j)
|
||||
object.msgSpec[j] = $root.SysMsg.SystemMessageMsgSpec.toObject(message.msgSpec[j], options);
|
||||
}
|
||||
if (message.bodyWrapper != null && message.hasOwnProperty("bodyWrapper"))
|
||||
object.bodyWrapper = $root.SysMsg.SystemMessageBodyWrapper.toObject(message.bodyWrapper, options);
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this SystemMessage to JSON.
|
||||
* @function toJSON
|
||||
* @memberof SysMsg.SystemMessage
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
SystemMessage.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessage
|
||||
* @function getTypeUrl
|
||||
@@ -394,42 +236,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return new SystemMessageHeader(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageHeader message. Does not implicitly {@link SysMsg.SystemMessageHeader.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof SysMsg.SystemMessageHeader
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessageHeader} message SystemMessageHeader message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessageHeader.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.peerNumber != null && Object.hasOwnProperty.call(message, "peerNumber"))
|
||||
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.peerNumber);
|
||||
if (message.peerString != null && Object.hasOwnProperty.call(message, "peerString"))
|
||||
writer.uint32(/* id 2, wireType 2 =*/18).string(message.peerString);
|
||||
if (message.uin != null && Object.hasOwnProperty.call(message, "uin"))
|
||||
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.uin);
|
||||
if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
|
||||
writer.uint32(/* id 6, wireType 2 =*/50).string(message.uid);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageHeader message, length delimited. Does not implicitly {@link SysMsg.SystemMessageHeader.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof SysMsg.SystemMessageHeader
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessageHeader} message SystemMessageHeader message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessageHeader.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessageHeader message from the specified reader or buffer.
|
||||
* @function decode
|
||||
@@ -488,101 +294,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessageHeader message.
|
||||
* @function verify
|
||||
* @memberof SysMsg.SystemMessageHeader
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
SystemMessageHeader.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
let properties = {};
|
||||
if (message.peerNumber != null && message.hasOwnProperty("peerNumber"))
|
||||
if (!$util.isInteger(message.peerNumber))
|
||||
return "peerNumber: integer expected";
|
||||
if (message.peerString != null && message.hasOwnProperty("peerString"))
|
||||
if (!$util.isString(message.peerString))
|
||||
return "peerString: string expected";
|
||||
if (message.uin != null && message.hasOwnProperty("uin"))
|
||||
if (!$util.isInteger(message.uin))
|
||||
return "uin: integer expected";
|
||||
if (message.uid != null && message.hasOwnProperty("uid")) {
|
||||
properties._uid = 1;
|
||||
if (!$util.isString(message.uid))
|
||||
return "uid: string expected";
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a SystemMessageHeader message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof SysMsg.SystemMessageHeader
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {SysMsg.SystemMessageHeader} SystemMessageHeader
|
||||
*/
|
||||
SystemMessageHeader.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.SysMsg.SystemMessageHeader)
|
||||
return object;
|
||||
let message = new $root.SysMsg.SystemMessageHeader();
|
||||
if (object.peerNumber != null)
|
||||
message.peerNumber = object.peerNumber >>> 0;
|
||||
if (object.peerString != null)
|
||||
message.peerString = String(object.peerString);
|
||||
if (object.uin != null)
|
||||
message.uin = object.uin >>> 0;
|
||||
if (object.uid != null)
|
||||
message.uid = String(object.uid);
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessageHeader message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof SysMsg.SystemMessageHeader
|
||||
* @static
|
||||
* @param {SysMsg.SystemMessageHeader} message SystemMessageHeader
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
SystemMessageHeader.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
let object = {};
|
||||
if (options.defaults) {
|
||||
object.peerNumber = 0;
|
||||
object.peerString = "";
|
||||
object.uin = 0;
|
||||
}
|
||||
if (message.peerNumber != null && message.hasOwnProperty("peerNumber"))
|
||||
object.peerNumber = message.peerNumber;
|
||||
if (message.peerString != null && message.hasOwnProperty("peerString"))
|
||||
object.peerString = message.peerString;
|
||||
if (message.uin != null && message.hasOwnProperty("uin"))
|
||||
object.uin = message.uin;
|
||||
if (message.uid != null && message.hasOwnProperty("uid")) {
|
||||
object.uid = message.uid;
|
||||
if (options.oneofs)
|
||||
object._uid = "uid";
|
||||
}
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this SystemMessageHeader to JSON.
|
||||
* @function toJSON
|
||||
* @memberof SysMsg.SystemMessageHeader
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
SystemMessageHeader.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessageHeader
|
||||
* @function getTypeUrl
|
||||
@@ -690,46 +401,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return new SystemMessageMsgSpec(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageMsgSpec message. Does not implicitly {@link SysMsg.SystemMessageMsgSpec.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof SysMsg.SystemMessageMsgSpec
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessageMsgSpec} message SystemMessageMsgSpec message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessageMsgSpec.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType"))
|
||||
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msgType);
|
||||
if (message.subType != null && Object.hasOwnProperty.call(message, "subType"))
|
||||
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.subType);
|
||||
if (message.subSubType != null && Object.hasOwnProperty.call(message, "subSubType"))
|
||||
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.subSubType);
|
||||
if (message.msgSeq != null && Object.hasOwnProperty.call(message, "msgSeq"))
|
||||
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.msgSeq);
|
||||
if (message.time != null && Object.hasOwnProperty.call(message, "time"))
|
||||
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.time);
|
||||
if (message.other != null && Object.hasOwnProperty.call(message, "other"))
|
||||
writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.other);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageMsgSpec message, length delimited. Does not implicitly {@link SysMsg.SystemMessageMsgSpec.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof SysMsg.SystemMessageMsgSpec
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessageMsgSpec} message SystemMessageMsgSpec message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessageMsgSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessageMsgSpec message from the specified reader or buffer.
|
||||
* @function decode
|
||||
@@ -796,112 +467,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessageMsgSpec message.
|
||||
* @function verify
|
||||
* @memberof SysMsg.SystemMessageMsgSpec
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
SystemMessageMsgSpec.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.msgType != null && message.hasOwnProperty("msgType"))
|
||||
if (!$util.isInteger(message.msgType))
|
||||
return "msgType: integer expected";
|
||||
if (message.subType != null && message.hasOwnProperty("subType"))
|
||||
if (!$util.isInteger(message.subType))
|
||||
return "subType: integer expected";
|
||||
if (message.subSubType != null && message.hasOwnProperty("subSubType"))
|
||||
if (!$util.isInteger(message.subSubType))
|
||||
return "subSubType: integer expected";
|
||||
if (message.msgSeq != null && message.hasOwnProperty("msgSeq"))
|
||||
if (!$util.isInteger(message.msgSeq))
|
||||
return "msgSeq: integer expected";
|
||||
if (message.time != null && message.hasOwnProperty("time"))
|
||||
if (!$util.isInteger(message.time))
|
||||
return "time: integer expected";
|
||||
if (message.other != null && message.hasOwnProperty("other"))
|
||||
if (!$util.isInteger(message.other))
|
||||
return "other: integer expected";
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a SystemMessageMsgSpec message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof SysMsg.SystemMessageMsgSpec
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {SysMsg.SystemMessageMsgSpec} SystemMessageMsgSpec
|
||||
*/
|
||||
SystemMessageMsgSpec.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.SysMsg.SystemMessageMsgSpec)
|
||||
return object;
|
||||
let message = new $root.SysMsg.SystemMessageMsgSpec();
|
||||
if (object.msgType != null)
|
||||
message.msgType = object.msgType >>> 0;
|
||||
if (object.subType != null)
|
||||
message.subType = object.subType >>> 0;
|
||||
if (object.subSubType != null)
|
||||
message.subSubType = object.subSubType >>> 0;
|
||||
if (object.msgSeq != null)
|
||||
message.msgSeq = object.msgSeq >>> 0;
|
||||
if (object.time != null)
|
||||
message.time = object.time >>> 0;
|
||||
if (object.other != null)
|
||||
message.other = object.other >>> 0;
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessageMsgSpec message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof SysMsg.SystemMessageMsgSpec
|
||||
* @static
|
||||
* @param {SysMsg.SystemMessageMsgSpec} message SystemMessageMsgSpec
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
SystemMessageMsgSpec.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
let object = {};
|
||||
if (options.defaults) {
|
||||
object.msgType = 0;
|
||||
object.subType = 0;
|
||||
object.subSubType = 0;
|
||||
object.msgSeq = 0;
|
||||
object.time = 0;
|
||||
object.other = 0;
|
||||
}
|
||||
if (message.msgType != null && message.hasOwnProperty("msgType"))
|
||||
object.msgType = message.msgType;
|
||||
if (message.subType != null && message.hasOwnProperty("subType"))
|
||||
object.subType = message.subType;
|
||||
if (message.subSubType != null && message.hasOwnProperty("subSubType"))
|
||||
object.subSubType = message.subSubType;
|
||||
if (message.msgSeq != null && message.hasOwnProperty("msgSeq"))
|
||||
object.msgSeq = message.msgSeq;
|
||||
if (message.time != null && message.hasOwnProperty("time"))
|
||||
object.time = message.time;
|
||||
if (message.other != null && message.hasOwnProperty("other"))
|
||||
object.other = message.other;
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this SystemMessageMsgSpec to JSON.
|
||||
* @function toJSON
|
||||
* @memberof SysMsg.SystemMessageMsgSpec
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
SystemMessageMsgSpec.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessageMsgSpec
|
||||
* @function getTypeUrl
|
||||
@@ -964,36 +529,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return new SystemMessageBodyWrapper(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageBodyWrapper message. Does not implicitly {@link SysMsg.SystemMessageBodyWrapper.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof SysMsg.SystemMessageBodyWrapper
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessageBodyWrapper} message SystemMessageBodyWrapper message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessageBodyWrapper.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.body != null && Object.hasOwnProperty.call(message, "body"))
|
||||
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.body);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified SystemMessageBodyWrapper message, length delimited. Does not implicitly {@link SysMsg.SystemMessageBodyWrapper.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof SysMsg.SystemMessageBodyWrapper
|
||||
* @static
|
||||
* @param {SysMsg.ISystemMessageBodyWrapper} message SystemMessageBodyWrapper message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
SystemMessageBodyWrapper.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a SystemMessageBodyWrapper message from the specified reader or buffer.
|
||||
* @function decode
|
||||
@@ -1040,80 +575,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a SystemMessageBodyWrapper message.
|
||||
* @function verify
|
||||
* @memberof SysMsg.SystemMessageBodyWrapper
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
SystemMessageBodyWrapper.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.body != null && message.hasOwnProperty("body"))
|
||||
if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body)))
|
||||
return "body: buffer expected";
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a SystemMessageBodyWrapper message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof SysMsg.SystemMessageBodyWrapper
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {SysMsg.SystemMessageBodyWrapper} SystemMessageBodyWrapper
|
||||
*/
|
||||
SystemMessageBodyWrapper.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.SysMsg.SystemMessageBodyWrapper)
|
||||
return object;
|
||||
let message = new $root.SysMsg.SystemMessageBodyWrapper();
|
||||
if (object.body != null)
|
||||
if (typeof object.body === "string")
|
||||
$util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0);
|
||||
else if (object.body.length >= 0)
|
||||
message.body = object.body;
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a SystemMessageBodyWrapper message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof SysMsg.SystemMessageBodyWrapper
|
||||
* @static
|
||||
* @param {SysMsg.SystemMessageBodyWrapper} message SystemMessageBodyWrapper
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
SystemMessageBodyWrapper.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
let object = {};
|
||||
if (options.defaults)
|
||||
if (options.bytes === String)
|
||||
object.body = "";
|
||||
else {
|
||||
object.body = [];
|
||||
if (options.bytes !== Array)
|
||||
object.body = $util.newBuffer(object.body);
|
||||
}
|
||||
if (message.body != null && message.hasOwnProperty("body"))
|
||||
object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body;
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this SystemMessageBodyWrapper to JSON.
|
||||
* @function toJSON
|
||||
* @memberof SysMsg.SystemMessageBodyWrapper
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
SystemMessageBodyWrapper.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for SystemMessageBodyWrapper
|
||||
* @function getTypeUrl
|
||||
@@ -1194,40 +655,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return new LikeDetail(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeDetail message. Does not implicitly {@link SysMsg.LikeDetail.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof SysMsg.LikeDetail
|
||||
* @static
|
||||
* @param {SysMsg.ILikeDetail} message LikeDetail message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
LikeDetail.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.txt != null && Object.hasOwnProperty.call(message, "txt"))
|
||||
writer.uint32(/* id 1, wireType 2 =*/10).string(message.txt);
|
||||
if (message.uin != null && Object.hasOwnProperty.call(message, "uin"))
|
||||
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.uin);
|
||||
if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname"))
|
||||
writer.uint32(/* id 5, wireType 2 =*/42).string(message.nickname);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeDetail message, length delimited. Does not implicitly {@link SysMsg.LikeDetail.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof SysMsg.LikeDetail
|
||||
* @static
|
||||
* @param {SysMsg.ILikeDetail} message LikeDetail message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
LikeDetail.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a LikeDetail message from the specified reader or buffer.
|
||||
* @function decode
|
||||
@@ -1282,88 +709,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a LikeDetail message.
|
||||
* @function verify
|
||||
* @memberof SysMsg.LikeDetail
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
LikeDetail.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.txt != null && message.hasOwnProperty("txt"))
|
||||
if (!$util.isString(message.txt))
|
||||
return "txt: string expected";
|
||||
if (message.uin != null && message.hasOwnProperty("uin"))
|
||||
if (!$util.isInteger(message.uin))
|
||||
return "uin: integer expected";
|
||||
if (message.nickname != null && message.hasOwnProperty("nickname"))
|
||||
if (!$util.isString(message.nickname))
|
||||
return "nickname: string expected";
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a LikeDetail message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof SysMsg.LikeDetail
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {SysMsg.LikeDetail} LikeDetail
|
||||
*/
|
||||
LikeDetail.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.SysMsg.LikeDetail)
|
||||
return object;
|
||||
let message = new $root.SysMsg.LikeDetail();
|
||||
if (object.txt != null)
|
||||
message.txt = String(object.txt);
|
||||
if (object.uin != null)
|
||||
message.uin = object.uin >>> 0;
|
||||
if (object.nickname != null)
|
||||
message.nickname = String(object.nickname);
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a LikeDetail message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof SysMsg.LikeDetail
|
||||
* @static
|
||||
* @param {SysMsg.LikeDetail} message LikeDetail
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
LikeDetail.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
let object = {};
|
||||
if (options.defaults) {
|
||||
object.txt = "";
|
||||
object.uin = 0;
|
||||
object.nickname = "";
|
||||
}
|
||||
if (message.txt != null && message.hasOwnProperty("txt"))
|
||||
object.txt = message.txt;
|
||||
if (message.uin != null && message.hasOwnProperty("uin"))
|
||||
object.uin = message.uin;
|
||||
if (message.nickname != null && message.hasOwnProperty("nickname"))
|
||||
object.nickname = message.nickname;
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this LikeDetail to JSON.
|
||||
* @function toJSON
|
||||
* @memberof SysMsg.LikeDetail
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
LikeDetail.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for LikeDetail
|
||||
* @function getTypeUrl
|
||||
@@ -1444,40 +789,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return new LikeMsg(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeMsg message. Does not implicitly {@link SysMsg.LikeMsg.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof SysMsg.LikeMsg
|
||||
* @static
|
||||
* @param {SysMsg.ILikeMsg} message LikeMsg message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
LikeMsg.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.count != null && Object.hasOwnProperty.call(message, "count"))
|
||||
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.count);
|
||||
if (message.time != null && Object.hasOwnProperty.call(message, "time"))
|
||||
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time);
|
||||
if (message.detail != null && Object.hasOwnProperty.call(message, "detail"))
|
||||
$root.SysMsg.LikeDetail.encode(message.detail, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified LikeMsg message, length delimited. Does not implicitly {@link SysMsg.LikeMsg.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof SysMsg.LikeMsg
|
||||
* @static
|
||||
* @param {SysMsg.ILikeMsg} message LikeMsg message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
LikeMsg.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a LikeMsg message from the specified reader or buffer.
|
||||
* @function decode
|
||||
@@ -1532,93 +843,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a LikeMsg message.
|
||||
* @function verify
|
||||
* @memberof SysMsg.LikeMsg
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
LikeMsg.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.count != null && message.hasOwnProperty("count"))
|
||||
if (!$util.isInteger(message.count))
|
||||
return "count: integer expected";
|
||||
if (message.time != null && message.hasOwnProperty("time"))
|
||||
if (!$util.isInteger(message.time))
|
||||
return "time: integer expected";
|
||||
if (message.detail != null && message.hasOwnProperty("detail")) {
|
||||
let error = $root.SysMsg.LikeDetail.verify(message.detail);
|
||||
if (error)
|
||||
return "detail." + error;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a LikeMsg message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof SysMsg.LikeMsg
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {SysMsg.LikeMsg} LikeMsg
|
||||
*/
|
||||
LikeMsg.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.SysMsg.LikeMsg)
|
||||
return object;
|
||||
let message = new $root.SysMsg.LikeMsg();
|
||||
if (object.count != null)
|
||||
message.count = object.count >>> 0;
|
||||
if (object.time != null)
|
||||
message.time = object.time >>> 0;
|
||||
if (object.detail != null) {
|
||||
if (typeof object.detail !== "object")
|
||||
throw TypeError(".SysMsg.LikeMsg.detail: object expected");
|
||||
message.detail = $root.SysMsg.LikeDetail.fromObject(object.detail);
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a LikeMsg message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof SysMsg.LikeMsg
|
||||
* @static
|
||||
* @param {SysMsg.LikeMsg} message LikeMsg
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
LikeMsg.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
let object = {};
|
||||
if (options.defaults) {
|
||||
object.count = 0;
|
||||
object.time = 0;
|
||||
object.detail = null;
|
||||
}
|
||||
if (message.count != null && message.hasOwnProperty("count"))
|
||||
object.count = message.count;
|
||||
if (message.time != null && message.hasOwnProperty("time"))
|
||||
object.time = message.time;
|
||||
if (message.detail != null && message.hasOwnProperty("detail"))
|
||||
object.detail = $root.SysMsg.LikeDetail.toObject(message.detail, options);
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this LikeMsg to JSON.
|
||||
* @function toJSON
|
||||
* @memberof SysMsg.LikeMsg
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
LikeMsg.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for LikeMsg
|
||||
* @function getTypeUrl
|
||||
@@ -1681,36 +905,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return new ProfileLikeTip(properties);
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified ProfileLikeTip message. Does not implicitly {@link SysMsg.ProfileLikeTip.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof SysMsg.ProfileLikeTip
|
||||
* @static
|
||||
* @param {SysMsg.IProfileLikeTip} message ProfileLikeTip message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
ProfileLikeTip.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.msg != null && Object.hasOwnProperty.call(message, "msg"))
|
||||
$root.SysMsg.LikeMsg.encode(message.msg, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encodes the specified ProfileLikeTip message, length delimited. Does not implicitly {@link SysMsg.ProfileLikeTip.verify|verify} messages.
|
||||
* @function encodeDelimited
|
||||
* @memberof SysMsg.ProfileLikeTip
|
||||
* @static
|
||||
* @param {SysMsg.IProfileLikeTip} message ProfileLikeTip message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
ProfileLikeTip.encodeDelimited = function encodeDelimited(message, writer) {
|
||||
return this.encode(message, writer).ldelim();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a ProfileLikeTip message from the specified reader or buffer.
|
||||
* @function decode
|
||||
@@ -1757,76 +951,6 @@ export const SysMsg = $root.SysMsg = (() => {
|
||||
return this.decode(reader, reader.uint32());
|
||||
};
|
||||
|
||||
/**
|
||||
* Verifies a ProfileLikeTip message.
|
||||
* @function verify
|
||||
* @memberof SysMsg.ProfileLikeTip
|
||||
* @static
|
||||
* @param {Object.<string,*>} message Plain object to verify
|
||||
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
ProfileLikeTip.verify = function verify(message) {
|
||||
if (typeof message !== "object" || message === null)
|
||||
return "object expected";
|
||||
if (message.msg != null && message.hasOwnProperty("msg")) {
|
||||
let error = $root.SysMsg.LikeMsg.verify(message.msg);
|
||||
if (error)
|
||||
return "msg." + error;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a ProfileLikeTip message from a plain object. Also converts values to their respective internal types.
|
||||
* @function fromObject
|
||||
* @memberof SysMsg.ProfileLikeTip
|
||||
* @static
|
||||
* @param {Object.<string,*>} object Plain object
|
||||
* @returns {SysMsg.ProfileLikeTip} ProfileLikeTip
|
||||
*/
|
||||
ProfileLikeTip.fromObject = function fromObject(object) {
|
||||
if (object instanceof $root.SysMsg.ProfileLikeTip)
|
||||
return object;
|
||||
let message = new $root.SysMsg.ProfileLikeTip();
|
||||
if (object.msg != null) {
|
||||
if (typeof object.msg !== "object")
|
||||
throw TypeError(".SysMsg.ProfileLikeTip.msg: object expected");
|
||||
message.msg = $root.SysMsg.LikeMsg.fromObject(object.msg);
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a plain object from a ProfileLikeTip message. Also converts values to other types if specified.
|
||||
* @function toObject
|
||||
* @memberof SysMsg.ProfileLikeTip
|
||||
* @static
|
||||
* @param {SysMsg.ProfileLikeTip} message ProfileLikeTip
|
||||
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
||||
* @returns {Object.<string,*>} Plain object
|
||||
*/
|
||||
ProfileLikeTip.toObject = function toObject(message, options) {
|
||||
if (!options)
|
||||
options = {};
|
||||
let object = {};
|
||||
if (options.defaults)
|
||||
object.msg = null;
|
||||
if (message.msg != null && message.hasOwnProperty("msg"))
|
||||
object.msg = $root.SysMsg.LikeMsg.toObject(message.msg, options);
|
||||
return object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts this ProfileLikeTip to JSON.
|
||||
* @function toJSON
|
||||
* @memberof SysMsg.ProfileLikeTip
|
||||
* @instance
|
||||
* @returns {Object.<string,*>} JSON object
|
||||
*/
|
||||
ProfileLikeTip.prototype.toJSON = function toJSON() {
|
||||
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for ProfileLikeTip
|
||||
* @function getTypeUrl
|
||||
|
@@ -20,9 +20,9 @@ export class UploadGroupFile extends BaseAction<UploadGroupFilePayload, null> {
|
||||
if (!success) {
|
||||
throw new Error(errMsg)
|
||||
}
|
||||
const sendFileEle = await SendElementEntities.file(this.ctx, path, payload.name || fileName, payload.folder_id)
|
||||
const file = await SendElementEntities.file(this.ctx, path, payload.name || fileName, payload.folder ?? payload.folder_id)
|
||||
const peer = await createPeer(this.ctx, payload, CreatePeerMode.Group)
|
||||
await sendMsg(this.ctx, peer, [sendFileEle], [])
|
||||
await sendMsg(this.ctx, peer, [file], [])
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
@@ -489,7 +489,7 @@ export namespace OB11Entities {
|
||||
}
|
||||
}
|
||||
else if (element.fileElement) {
|
||||
return new OB11GroupUploadNoticeEvent(parseInt(msg.peerUid), parseInt(msg.senderUin!), {
|
||||
return new OB11GroupUploadNoticeEvent(+msg.peerUid, +msg.senderUin!, {
|
||||
id: element.fileElement.fileUuid!,
|
||||
name: element.fileElement.fileName,
|
||||
size: parseInt(element.fileElement.fileSize),
|
||||
@@ -587,7 +587,7 @@ export namespace OB11Entities {
|
||||
{ txt: '头衔', type: 'nor' }
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
* */
|
||||
if (grayTipElement.jsonGrayTipElement.busiId == 1061) {
|
||||
//判断业务类型
|
||||
|
@@ -1 +1 @@
|
||||
export const version = '3.32.3'
|
||||
export const version = '3.32.4'
|
||||
|
Reference in New Issue
Block a user