Skip to content

Commit 3fbddc7

Browse files
Merge pull request #84 from Kommunicate-io/release/1.1.9
Release/1.1.9
2 parents 2a963e9 + eec1b52 commit 3fbddc7

File tree

9 files changed

+25
-11
lines changed

9 files changed

+25
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The changelog for [KommunicateCore-iOS-SDK](https://github.com/Kommunicate-io/KommunicateCore-iOS-SDK). Also see the [releases](https://github.com/Kommunicate-io/KommunicateCore-iOS-SDK/releases) on Github.
44

5+
## [1.1.9] 2024-04-10
6+
- Added support for conversation deletion sync.
57
## [1.1.8] 2024-02-12
68
- Zendesk (Zopim) integration optimisations
79
- Sync Api optimization

Example/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- KommunicateCore-iOS-SDK (1.1.8)
2+
- KommunicateCore-iOS-SDK (1.1.9)
33

44
DEPENDENCIES:
55
- KommunicateCore-iOS-SDK (from `../`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
99
:path: "../"
1010

1111
SPEC CHECKSUMS:
12-
KommunicateCore-iOS-SDK: 87c6e7c9f0e1e32d258c36b70ba20ffbd4428c90
12+
KommunicateCore-iOS-SDK: d8c46aea82b1090effb568f2aaf1938f31f8e0b5
1313

1414
PODFILE CHECKSUM: 7027d57d0977da2f7eeddd9ce9eb5c4b46250a39
1515

16-
COCOAPODS: 1.14.3
16+
COCOAPODS: 1.13.0

Example/Pods/Local Podspecs/KommunicateCore-iOS-SDK.podspec.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/KommunicateCore-iOS-SDK/KommunicateCore-iOS-SDK-Info.plist

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

KommunicateCore-iOS-SDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KommunicateCore-iOS-SDK'
3-
s.version = '1.1.8'
3+
s.version = '1.1.9'
44
s.summary = 'KommunicateCore-iOS SDK pod'
55
s.description = <<-DESC
66
The KommunicateCore-iOS SDK helps you build your own custom UI in your iOS app

Sources/applozickit/ALMQTTConversationService.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,11 @@ - (void)newMessage:(MQTTSession *)session
307307

308308
ALPushAssist *pushAssist = [[ALPushAssist alloc] init];
309309
ALMessage *alMessage = [[ALMessage alloc] initWithDictonary:[theMessageDict objectForKey:@"message"]];
310-
310+
311+
if (alMessage.isConversationDeleted) {
312+
[[NSNotificationCenter defaultCenter] postNotificationName:@"CONVERSATION_DELETED" object:alMessage];
313+
}
314+
311315
if ([alMessage isHiddenMessage]) {
312316
ALSLog(ALLoggerSeverityInfo, @"< HIDDEN MESSAGE RECEIVED >");
313317
[ALMessageService getLatestMessageForUser:[ALUserDefaultsHandler getDeviceKeyString] withDelegate:self.realTimeUpdate

Sources/include/ALMessage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ typedef enum {
135135
- (BOOL)isSilentNotification;
136136
- (BOOL)isDeletedForAll;
137137
- (BOOL)isMessageSentToServer;
138+
- (BOOL)isConversationDeleted;
138139

139140
- (instancetype)initWithBuilder:(ALMessageBuilder *)builder;
140141
+ (instancetype)build:(void (^)(ALMessageBuilder *))builder;

Sources/message/ALMessage.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
static NSString * const AL_DELETE_MESSAGE_FOR_KEY = @"AL_DELETE_GROUP_MESSAGE_FOR_ALL";
1818
static NSString * const AL_TRUE = @"true";
19+
static NSString * const AL_CONVERSATION_DELETE_ACTION = @"4";
1920

2021
@implementation ALMessage
2122

@@ -410,6 +411,12 @@ - (BOOL)isDeletedForAll {
410411
[[self.metadata valueForKey:AL_DELETE_MESSAGE_FOR_KEY] isEqualToString:AL_TRUE];
411412
}
412413

414+
- (BOOL) isConversationDeleted {
415+
return self.metadata &&
416+
[self.metadata valueForKey:@"action"] &&
417+
[[self.metadata valueForKey: @"action"] isEqualToString: AL_CONVERSATION_DELETE_ACTION];
418+
}
419+
413420
- (instancetype)initWithBuilder:(ALMessageBuilder *)builder {
414421
if (self = [super init]) {
415422
_contactIds = builder.to;

0 commit comments

Comments
 (0)