Skip to content

Commit

Permalink
Update ==> 适配2.3.19 && 新增 alfred 开关
Browse files Browse the repository at this point in the history
  • Loading branch information
TKkk-iOSer committed Oct 23, 2018
1 parent d179408 commit 1f0dfce
Show file tree
Hide file tree
Showing 40 changed files with 112 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];
@property(retain, nonatomic) NSString *m_nsHeadHDImgUrl;
@property(retain, nonatomic) NSString *m_nsHeadHDMd5;
@property(retain, nonatomic) NSString *m_nsAliasName;
@property(retain, nonatomic) NSString *avatarCacheKey;
@property(nonatomic) BOOL m_isShowRedDot;
- (BOOL)isBrandContact;
- (BOOL)isSelf;
Expand Down Expand Up @@ -296,7 +297,9 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];

@interface MMAvatarService : NSObject
- (NSString *)avatarCachePath;
- (id)_getImageFromCacheWithMD5Key:(id)arg1;
- (void)avatarImageWithContact:(id)arg1 completion:(void (^)(NSImage *image))arg2;
- (void)getAvatarImageWithContact:(id)arg1 completion:(void (^)(NSImage *image))arg2;
@end

@interface NSString (MD5)
Expand Down Expand Up @@ -386,6 +389,7 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];
@end

@interface PathUtility : NSObject
+ (id)GetCurUserCachePath;
+ (id)emoticonPath:(id)arg1;
+ (id)getMsgVideoPathWithMessage:(id)arg1;
+ (id)getMsgVideoPathWithUserName:(id)arg1 localId:(unsigned int)arg2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17G65</string>
<string>18A391</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.7.1</string>
<string>1.7.3</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -40,7 +40,9 @@
<string>10A255</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017年 tk. All rights reserved.</string>
<key>showUpdateWindow</key>
<true/>
<key>versionInfo</key>
<string>v1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
<string>v1.7.3 (2018-10-22):\n👉🏻 适配微信 Version. 2.3.19\n👉🏼 修复安全漏洞(请务必更新,若有安装QQ插件也需要更新)\n👉🏽 菜单栏-关于小助手-新增 alfred 开关\n \n\n\nv1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];
@property(retain, nonatomic) NSString *m_nsHeadHDImgUrl;
@property(retain, nonatomic) NSString *m_nsHeadHDMd5;
@property(retain, nonatomic) NSString *m_nsAliasName;
@property(retain, nonatomic) NSString *avatarCacheKey;
@property(nonatomic) BOOL m_isShowRedDot;
- (BOOL)isBrandContact;
- (BOOL)isSelf;
Expand Down Expand Up @@ -296,7 +297,9 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];

@interface MMAvatarService : NSObject
- (NSString *)avatarCachePath;
- (id)_getImageFromCacheWithMD5Key:(id)arg1;
- (void)avatarImageWithContact:(id)arg1 completion:(void (^)(NSImage *image))arg2;
- (void)getAvatarImageWithContact:(id)arg1 completion:(void (^)(NSImage *image))arg2;
@end

@interface NSString (MD5)
Expand Down Expand Up @@ -386,6 +389,7 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];
@end

@interface PathUtility : NSObject
+ (id)GetCurUserCachePath;
+ (id)emoticonPath:(id)arg1;
+ (id)getMsgVideoPathWithMessage:(id)arg1;
+ (id)getMsgVideoPathWithUserName:(id)arg1 localId:(unsigned int)arg2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17G65</string>
<string>18A391</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.7.1</string>
<string>1.7.3</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -40,7 +40,9 @@
<string>10A255</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017年 tk. All rights reserved.</string>
<key>showUpdateWindow</key>
<true/>
<key>versionInfo</key>
<string>v1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
<string>v1.7.3 (2018-10-22):\n👉🏻 适配微信 Version. 2.3.19\n👉🏼 修复安全漏洞(请务必更新,若有安装QQ插件也需要更新)\n👉🏽 菜单栏-关于小助手-新增 alfred 开关\n \n\n\nv1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];
@property(retain, nonatomic) NSString *m_nsHeadHDImgUrl;
@property(retain, nonatomic) NSString *m_nsHeadHDMd5;
@property(retain, nonatomic) NSString *m_nsAliasName;
@property(retain, nonatomic) NSString *avatarCacheKey;
@property(nonatomic) BOOL m_isShowRedDot;
- (BOOL)isBrandContact;
- (BOOL)isSelf;
Expand Down Expand Up @@ -296,7 +297,9 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];

@interface MMAvatarService : NSObject
- (NSString *)avatarCachePath;
- (id)_getImageFromCacheWithMD5Key:(id)arg1;
- (void)avatarImageWithContact:(id)arg1 completion:(void (^)(NSImage *image))arg2;
- (void)getAvatarImageWithContact:(id)arg1 completion:(void (^)(NSImage *image))arg2;
@end

@interface NSString (MD5)
Expand Down Expand Up @@ -386,6 +389,7 @@ FOUNDATION_EXPORT const unsigned char WeChatPluginVersionString[];
@end

@interface PathUtility : NSObject
+ (id)GetCurUserCachePath;
+ (id)emoticonPath:(id)arg1;
+ (id)getMsgVideoPathWithMessage:(id)arg1;
+ (id)getMsgVideoPathWithUserName:(id)arg1 localId:(unsigned int)arg2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17G65</string>
<string>18A391</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.7.1</string>
<string>1.7.3</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -40,7 +40,9 @@
<string>10A255</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017年 tk. All rights reserved.</string>
<key>showUpdateWindow</key>
<true/>
<key>versionInfo</key>
<string>v1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
<string>v1.7.3 (2018-10-22):\n👉🏻 适配微信 Version. 2.3.19\n👉🏼 修复安全漏洞(请务必更新,若有安装QQ插件也需要更新)\n👉🏽 菜单栏-关于小助手-新增 alfred 开关\n \n\n\nv1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Other/Products/Debug/WeChatPlugin.framework/WeChatPlugin
Binary file not shown.
Binary file modified Other/ScreenShots/wechatplugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

![微信小助手.png](./Other/ScreenShots/wechatplugin.png)

![platform](https://img.shields.io/badge/platform-macos-lightgrey.svg) [![release](https://img.shields.io/badge/release-v1.7-brightgreen.svg)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases) ![support](https://img.shields.io/badge/support-wechat%202.3.10-blue.svg) [![Readme](https://img.shields.io/badge/readme-english-yellow.svg)](./README_EN.md) [![GitHub license](https://img.shields.io/github/license/TKkk-iOSer/WeChatPlugin-MacOS.svg)](./LICENSE)
![platform](https://img.shields.io/badge/platform-macos-lightgrey.svg) [![release](https://img.shields.io/badge/release-v1.7.3-brightgreen.svg)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases) ![support](https://img.shields.io/badge/support-wechat%202.3.19-blue.svg) [![Readme](https://img.shields.io/badge/readme-english-yellow.svg)](./README_EN.md) [![GitHub license](https://img.shields.io/github/license/TKkk-iOSer/WeChatPlugin-MacOS.svg)](./LICENSE)

# 微信小助手 v1.7.1
# 微信小助手 v1.7.3

**[English](./README_EN.md) | 中文**

Expand Down Expand Up @@ -38,6 +38,7 @@
* 去除微信url转链(从此直接打开抖音链接🌝
* 史上最强 alfred 扩展🌚
* 新增移除会话(不删除聊天记录)
* 菜单栏(关于小助手)新增 alfred 开关

远程控制:

Expand All @@ -54,6 +55,8 @@

## 更新日志

* [适配2.3.19 & 修复安全漏洞(2018-10-23)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases/tag/v1.7.3)

* [适配2.3.17 & 加强 alfred 搜索(2018-07-24)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases/tag/v1.7.1)

* [新增好多功能…(2018-05-12)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases/tag/v1.7)
Expand Down Expand Up @@ -196,6 +199,7 @@ curl -o- -L https://raw.githubusercontent.com/lmk123/oh-my-wechat/master/install
- [x] 优化小助手设置(更新后保留相关设置,更新提醒)
- [x] 语音远程控制 mac
- [x] 支持中英文
- [ ] 支持深色模式

---

Expand All @@ -208,6 +212,11 @@ curl -o- -L https://raw.githubusercontent.com/lmk123/oh-my-wechat/master/install

---

### 免责声明

本项目旨在方便生活中微信使用,不可使用于商业和个人其他意图。若使用不当,均由个人承担。

---

### 听说你想请我喝下午茶?😏

Expand Down
6 changes: 4 additions & 2 deletions WeChatPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.7.1</string>
<string>1.7.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017年 tk. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
<key>showUpdateWindow</key>
<true/>
<key>versionInfo</key>
<string>v1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
<string>v1.7.3 (2018-10-22):\n👉🏻 适配微信 Version. 2.3.19\n👉🏼 修复安全漏洞(请务必更新,若有安装QQ插件也需要更新)\n👉🏽 菜单栏-关于小助手-新增 alfred 开关(若不使用 aflred 可关闭)\n \n\n\nv1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
</dict>
</plist>
5 changes: 3 additions & 2 deletions WeChatPlugin/Sources/Config/TKWeChatPluginConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
@property (nonatomic, assign) BOOL onTop; /**< 是否要置顶微信 */
@property (nonatomic, assign) BOOL multipleSelectionEnable; /**< 是否要进行多选 */
@property (nonatomic, assign) BOOL forbidCheckVersion; /**< 禁止检测版本 */
@property (nonatomic, strong) NSMutableArray *autoReplyModels; /**< 自动回复的数组 */
@property (nonatomic, strong) NSMutableArray *remoteControlModels; /**< 远程控制的数组 */
@property (nonatomic, assign) BOOL alfredEnable; /**< 是否开启Alfred */
@property (nonatomic, strong) NSMutableArray *autoReplyModels; /**< 自动回复的数组 */
@property (nonatomic, strong) NSMutableArray *remoteControlModels; /**< 远程控制的数组 */
@property (nonatomic, strong) NSMutableArray *ignoreSessionModels; /**< 聊天置底的数组 */
@property (nonatomic, strong) NSMutableArray *selectSessions; /**< 已经选中的会话 */
@property (nonatomic, strong) NSMutableSet *revokeMsgSet; /**< 撤回的消息集合 */
Expand Down
8 changes: 8 additions & 0 deletions WeChatPlugin/Sources/Config/TKWeChatPluginConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
static NSString * const kTKAutoLoginEnableKey = @"kTKAutoLoginEnableKey";
static NSString * const kTKOnTopKey = @"kTKOnTopKey";
static NSString * const kTKForbidCheckVersionKey = @"kTKForbidCheckVersionKey";
static NSString * const kTKAlfredEnableKey = @"kTKAlfredEnableKey";
static NSString * const kTKWeChatResourcesPath = @"/Applications/WeChat.app/Contents/MacOS/WeChatPlugin.framework/Resources/";
static NSString * const kTKWeChatRemotePlistPath = @"https://raw.githubusercontent.com/TKkk-iOSer/WeChatPlugin-MacOS/master/Other/Products/Debug/WeChatPlugin.framework/Resources/Info.plist";

Expand Down Expand Up @@ -54,6 +55,7 @@ - (instancetype)init {
_autoLoginEnable = [[NSUserDefaults standardUserDefaults] boolForKey:kTKAutoLoginEnableKey];
_onTop = [[NSUserDefaults standardUserDefaults] boolForKey:kTKOnTopKey];
_forbidCheckVersion = [[NSUserDefaults standardUserDefaults] boolForKey:kTKForbidCheckVersionKey];
_alfredEnable = [[NSUserDefaults standardUserDefaults] boolForKey:kTKAlfredEnableKey];
}
return self;
}
Expand Down Expand Up @@ -100,6 +102,12 @@ - (void)setForbidCheckVersion:(BOOL)forbidCheckVersion {
[[NSUserDefaults standardUserDefaults] synchronize];
}

- (void)setAlfredEnable:(BOOL)alfredEnable {
_alfredEnable = alfredEnable;
[[NSUserDefaults standardUserDefaults] setBool:_alfredEnable forKey:kTKAlfredEnableKey];
[[NSUserDefaults standardUserDefaults] synchronize];
}

#pragma mark - 自动回复
- (NSArray *)autoReplyModels {
if (!_autoReplyModels) {
Expand Down
18 changes: 13 additions & 5 deletions WeChatPlugin/Sources/Hook/WeChat+hook.m
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,15 @@ + (BOOL)hook_HasWechatInstance {
hook 微信撤回消息
*/
- (void)hook_onRevokeMsg:(id)msg {
- (void)hook_onRevokeMsg:(id)msgData {
if (![[TKWeChatPluginConfig sharedConfig] preventRevokeEnable]) {
[self hook_onRevokeMsg:msg];
[self hook_onRevokeMsg:msgData];
return;
}
id msg = msgData;
if ([msgData isKindOfClass:objc_getClass("MessageData")]) {
msg = [msgData valueForKey:@"msgContent"];
}
if ([msg rangeOfString:@"<sysmsg"].length <= 0) return;

// 转换群聊的 msg
Expand All @@ -152,7 +156,7 @@ - (void)hook_onRevokeMsg:(id)msg {
MessageService *msgService = [[objc_getClass("MMServiceCenter") defaultCenter] getService:objc_getClass("MessageService")];
MessageData *revokeMsgData = [msgService GetMsgData:session svrId:[newmsgid integerValue]];
if ([revokeMsgData isSendFromSelf] && ![[TKWeChatPluginConfig sharedConfig] preventSelfRevokeEnable]) {
[self hook_onRevokeMsg:msg];
[self hook_onRevokeMsg:msgData];
return;
}
NSString *msgContent = [[TKMessageManager shareManager] getMessageContentWithData:revokeMsgData];
Expand Down Expand Up @@ -256,7 +260,9 @@ - (void)hook_onAuthOK:(BOOL)arg1 {
[self hook_onAuthOK:arg1];

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[TKWebServerManager shareManager] startServer];
if ([[TKWeChatPluginConfig sharedConfig] alfredEnable]) {
[[TKWebServerManager shareManager] startServer];
}
NSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu];
NSMenuItem *pluginMenu = mainMenu.itemArray.lastObject;
pluginMenu.enabled = YES;
Expand All @@ -266,7 +272,9 @@ - (void)hook_onAuthOK:(BOOL)arg1 {
}

- (void)hook_sendLogoutCGIWithCompletion:(id)arg1 {
[[TKWebServerManager shareManager] endServer];
if ([[TKWeChatPluginConfig sharedConfig] alfredEnable]) {
[[TKWebServerManager shareManager] endServer];
}

BOOL autoAuthEnable = [[TKWeChatPluginConfig sharedConfig] autoAuthEnable];
WeChat *wechat = [objc_getClass("WeChat") sharedInstance];
Expand Down
Loading

0 comments on commit 1f0dfce

Please sign in to comment.