Skip to content

Commit

Permalink
fix: rename all disableSocketMsgpack to disableMsgpack
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjackyuanjie authored and moonrailgun committed Jun 2, 2024
1 parent 6d47b7b commit 7870c83
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/shared/api/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ export function createSocket(token: string): Promise<AppSocket> {
}

return new Promise((resolve, reject) => {
const disableSocketMsgpack = getGlobalConfig().disableSocketMsgpack;
const disableMsgpack = getGlobalConfig().disableMsgpack;
_socket = io(getServiceUrl(), {
transports: ['websocket'],
auth: {
token,
},
forceNew: true,
parser: disableSocketMsgpack ? undefined : msgpackParser,
parser: disableMsgpack ? undefined : msgpackParser,
});
_socket.once('connect', () => {
// 连接成功
Expand Down
2 changes: 1 addition & 1 deletion client/shared/model/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface GlobalConfig {
/**
* 是否禁用 Socketio 的 Msgpack 解析器
*/
disableSocketMsgpack?: boolean;
disableMsgpack?: boolean;

/**
* 是否禁用注册功能
Expand Down
2 changes: 1 addition & 1 deletion client/shared/utils/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const defaultGlobalConfig: GlobalConfig = {
uploadFileLimit: 1 * 1024 * 1024,
emailVerification: false,
serverName: 'Tailchat',
disableSocketMsgpack: false,
disableMsgpack: false,
disableUserRegister: false,
disableGuestLogin: false,
disableCreateGroup: false,
Expand Down

0 comments on commit 7870c83

Please sign in to comment.