Skip to content

Commit 7870c83

Browse files
shenjackyuanjiemoonrailgun
authored andcommitted
fix: rename all disableSocketMsgpack to disableMsgpack
1 parent 6d47b7b commit 7870c83

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

client/shared/api/socket.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ export function createSocket(token: string): Promise<AppSocket> {
208208
}
209209

210210
return new Promise((resolve, reject) => {
211-
const disableSocketMsgpack = getGlobalConfig().disableSocketMsgpack;
211+
const disableMsgpack = getGlobalConfig().disableMsgpack;
212212
_socket = io(getServiceUrl(), {
213213
transports: ['websocket'],
214214
auth: {
215215
token,
216216
},
217217
forceNew: true,
218-
parser: disableSocketMsgpack ? undefined : msgpackParser,
218+
parser: disableMsgpack ? undefined : msgpackParser,
219219
});
220220
_socket.once('connect', () => {
221221
// 连接成功

client/shared/model/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface GlobalConfig {
3737
/**
3838
* 是否禁用 Socketio 的 Msgpack 解析器
3939
*/
40-
disableSocketMsgpack?: boolean;
40+
disableMsgpack?: boolean;
4141

4242
/**
4343
* 是否禁用注册功能

client/shared/utils/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const defaultGlobalConfig: GlobalConfig = {
2323
uploadFileLimit: 1 * 1024 * 1024,
2424
emailVerification: false,
2525
serverName: 'Tailchat',
26-
disableSocketMsgpack: false,
26+
disableMsgpack: false,
2727
disableUserRegister: false,
2828
disableGuestLogin: false,
2929
disableCreateGroup: false,

0 commit comments

Comments
 (0)