diff --git a/WeChatTweak.framework/Versions/A/WeChatTweak b/WeChatTweak.framework/Versions/A/WeChatTweak index c81638d..417c371 100755 Binary files a/WeChatTweak.framework/Versions/A/WeChatTweak and b/WeChatTweak.framework/Versions/A/WeChatTweak differ diff --git a/WeChatTweak/WeChatTweak.m b/WeChatTweak/WeChatTweak.m index 29567cf..67a4b84 100755 --- a/WeChatTweak/WeChatTweak.m +++ b/WeChatTweak/WeChatTweak.m @@ -47,6 +47,7 @@ static void __attribute__((constructor)) tweak(void) { class_addMethod(objc_getClass("AppDelegate"), @selector(applicationDockMenu:), method_getImplementation(class_getInstanceMethod(objc_getClass("AppDelegate"), @selector(tweak_applicationDockMenu:))), "@:@"); [objc_getClass("AppDelegate") jr_swizzleMethod:NSSelectorFromString(@"applicationDidFinishLaunching:") withMethod:@selector(tweak_applicationDidFinishLaunching:) error:nil]; [objc_getClass("LogoutCGI") jr_swizzleMethod:NSSelectorFromString(@"sendLogoutCGIWithCompletion:") withMethod:@selector(tweak_sendLogoutCGIWithCompletion:) error:nil]; + [objc_getClass("AccountService") jr_swizzleMethod:NSSelectorFromString(@"onAuthOKOfUser:withSessionKey:withServerId:autoAuthKey:isAutoAuth:") withMethod:@selector(tweak_onAuthOKOfUser:withSessionKey:withServerId:autoAuthKey:isAutoAuth:) error:nil]; [objc_getClass("MessageService") jr_swizzleMethod:NSSelectorFromString(@"onRevokeMsg:") withMethod:@selector(tweak_onRevokeMsg:) error:nil]; [objc_getClass("CUtility") jr_swizzleClassMethod:NSSelectorFromString(@"HasWechatInstance") withClassMethod:@selector(tweak_HasWechatInstance) error:nil]; [objc_getClass("MASPreferencesWindowController") jr_swizzleMethod:NSSelectorFromString(@"initWithViewControllers:") withMethod:@selector(tweak_initWithViewControllers:) error:nil]; @@ -150,7 +151,11 @@ static void __attribute__((constructor)) tweak(void) { [accountService AutoAuth]; } } +} + +- (void)tweak_onAuthOKOfUser:(id)arg1 withSessionKey:(id)arg2 withServerId:(id)arg3 autoAuthKey:(id)arg4 isAutoAuth:(BOOL)arg5 { [[AlfredManager sharedInstance] startListener]; + [self tweak_onAuthOKOfUser:arg1 withSessionKey:arg2 withServerId:arg3 autoAuthKey:arg4 isAutoAuth:arg5]; } - (void)tweak_sendLogoutCGIWithCompletion:(id)completion { diff --git a/WeChatTweak/WeChatTweakHeaders.h b/WeChatTweak/WeChatTweakHeaders.h index ec9aeac..6b24782 100644 --- a/WeChatTweak/WeChatTweakHeaders.h +++ b/WeChatTweak/WeChatTweakHeaders.h @@ -91,6 +91,7 @@ - (BOOL)canAutoAuth; - (void)AutoAuth; +- (void)onAuthOKOfUser:(id)arg1 withSessionKey:(id)arg2 withServerId:(id)arg3 autoAuthKey:(id)arg4 isAutoAuth:(BOOL)arg5; @end