Skip to content

Commit

Permalink
Merge pull request #162 from vyqrvwgf/master
Browse files Browse the repository at this point in the history
无消息访客过滤debug
  • Loading branch information
vyqrvwgf authored Aug 4, 2017
2 parents 26a8c45 + 4babff8 commit 05274d8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down
2 changes: 1 addition & 1 deletion Meiqia-SDK-Demo/Meiqia-SDK-Demo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
#endif

//#error 请填写您的美洽 AppKey
[MQManager initWithAppkey:@"a891aac118366700931f3df3181c64a0" completion:^(NSString *clientId, NSError *error) {
[MQManager initWithAppkey:@"" completion:^(NSString *clientId, NSError *error) {
if (!error) {
NSLog(@"美洽 SDK:初始化成功");
} else {
Expand Down
2 changes: 1 addition & 1 deletion Meiqia-SDK-Demo/Meiqia-SDK-Demo/DevelopViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ - (void)inputCustomizedId {
* @param customizedId 自定义id
*/
- (void)setClientOnlineWithCustomizedId:(NSString *)customizedId {
[MQManager initWithAppkey:@"a891aac118366700931f3df3181c64a0" completion:^(NSString *clientId, NSError *error) {
[MQManager initWithAppkey:@"" completion:^(NSString *clientId, NSError *error) {
if (!error) {
MQChatViewManager *chatViewManager = [[MQChatViewManager alloc] init];
[chatViewManager setLoginCustomizedId:customizedId];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ - (void)presentUI {
// 获取是否开启无消息访客过滤, warning:用之前的绑定的clientId上线,防止出现排队现象
//
if (enterprise.configInfo.isScheduleAfterClientSendMessage && ![MQManager getLoginStatus]) {
// 1.设置head title
// 设置head title
[self updateNavTitleWithAgentName:enterprise.configInfo.public_nickname ?: @"官方客服" agentStatus:MQChatAgentStatusNone];
// 2.设置欢迎语 3.设置企业头像
// 设置欢迎语 设置企业头像
MQTextMessage *message = [[MQTextMessage alloc] initWithContent: enterprise.configInfo.enterpriseIntro ?: @"【系统消息】您好,请问您有什么问题?"];
message.fromType = MQChatMessageIncoming;
message.date = [NSDate new];
Expand All @@ -156,10 +156,14 @@ - (void)presentUI {
message.sendStatus = MQChatMessageSendStatusSuccess;
MQTextCellModel *cellModel = [[MQTextCellModel alloc] initCellModelWithMessage: message cellWidth:self.chatViewService.chatViewWidth delegate:(id <MQCellModelDelegate>)self.chatViewService];
[self.chatViewService addCellModelAndReloadTableViewWithModel:cellModel];
// 3.显示下拉加载历史消息
self.chatTableView.contentInset = UIEdgeInsetsMake(120.0, 0.0, 0.0, 0.0);
[self.chatTableView.refreshView updateTextForStatus:MQRefreshStatusDraging];
[self.chatTableView.refreshView updateCustomViewForStatus:MQRefreshStatusDraging];
// 加载历史消息
[self.chatViewService startGettingHistoryMessages];
// 注册通知
[MQManager addStateObserverWithBlock:^(MQState oldState, MQState newState, NSDictionary *value, NSError *error) {
if (newState == MQStateUnallocatedAgent) { // 离线
[MQManager setClientOffline];
}
} withKey:@"MQChatViewController"];
} else { // 如果未开启,直接让用户上线
[self.chatViewService setClientOnline];
}
Expand Down
Binary file modified Meiqia-SDK-files/MeiQiaSDK.framework/MeiQiaSDK
Binary file not shown.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ framework中的文件 | 说明
在 Podfile 中加入:

```
pod 'Meiqia', '~> 3.3.8'
pod 'Meiqia', '~> 3.3.9'
```

接着安装美洽 pod 即可:
Expand Down Expand Up @@ -870,6 +870,7 @@ VoiceConvert | N/A | AMR 和 WAV 语音格式的互转;没找到出处,哪
**v3.3.9 2017 年 6 月 20 日**
* 修复使用私有API导致苹果审核被拒问题
* 添加iPhone5SE来源信息
* 添加无消息访客过滤

**v3.3.8 2017 年 4 月 10 日**
* 修复如果在对话没有结束,连接正常的情况下,重新指定客服或者客服组没有效果的问题
Expand Down

0 comments on commit 05274d8

Please sign in to comment.