Skip to content

Commit

Permalink
修复euphony重复注册问题 #9
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyumoko committed Jul 16, 2024
1 parent 4e343c1 commit 1ed3be6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions injects/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,11 @@ Process.dlopen = (module, filename, flags = os.constants.dlopen.RTLD_LAZY) => {
return originalResult;
}

ipcMain.handle('LiteLoader.euphony.getClientKey', async () => {
ipcMain.handle('LiteLoader.eencode.euphony.getClientKey', async () => {
return await NodeIQQNTWrapperSession.getTicketService().forceFetchClientKey('');
});

ipcMain.handle('LiteLoader.euphony.getPskey', async (event, uin, clientKey, keyIndex, domain) => {
ipcMain.handle('LiteLoader.eencode.euphony.getPskey', async (event, uin, clientKey, keyIndex, domain) => {
try {
const redirectResponse = await fetch(`https://ssl.ptlogin2.qq.com/jump?ptlang=1033&clientuin=${ uin }&clientkey=${ clientKey }&u1=https%3A%2F%2F${ domain }&keyindex=${ keyIndex }`, {
method: 'GET',
Expand Down Expand Up @@ -472,7 +472,7 @@ ipcMain.handle('LiteLoader.euphony.getPskey', async (event, uin, clientKey, keyI
}
});

ipcMain.handle('LiteLoader.euphony.drawLuckyCard', async (event, uin, friendUin, pskey) => {
ipcMain.handle('LiteLoader.eencode.euphony.drawLuckyCard', async (event, uin, friendUin, pskey) => {
try {
const response = await fetch('https://ti.qq.com/interactive_logo/word/proxy/domain/oidb.tim.qq.com/v3/oidbinterface/oidb_0xdd0_0?sdkappid=39998', {
method: 'POST',
Expand Down
6 changes: 3 additions & 3 deletions injects/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,17 @@ contextBridge.exposeInMainWorld('euphonyNative', {

contextBridge.exposeInMainWorld('euphonyInternal', {
getClientKey: () => ipcRenderer.invoke(
'LiteLoader.euphony.getClientKey'
'LiteLoader.eencode.euphony.getClientKey'
),
getPskey: (uin, clientKey, keyIndex, domain) => ipcRenderer.invoke(
'LiteLoader.euphony.getPskey',
'LiteLoader.eencode.euphony.getPskey',
uin,
clientKey,
keyIndex,
domain
),
drawLuckyCard: (uin, friendUin, pskey) => ipcRenderer.invoke(
'LiteLoader.euphony.drawLuckyCard',
'LiteLoader.eencode.euphony.drawLuckyCard',
uin,
friendUin,
pskey
Expand Down

0 comments on commit 1ed3be6

Please sign in to comment.