Repository: Kommunicate-io/KommunicateCore-iOS-SDK
Pull request #124: [CM-2409] Real Time Assignment Status Update Flow Migrate| iOS SDK
Author: login: KommunicateDeveloper
Created: 2025-05-06T10:19:04Z | Merged: 2025-05-14T18:00:44Z

## Summary
- Migrated the V5 Sync Api Call `chat.kommuniate.io/rest/ws/group/v5/list` to  V2 Info with group ID param `chat.kommunicate.io/rest/ws/group/v2/info`. 


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Added the ability to synchronize and update information for a specific channel, including user details, using new methods in the channel management interface.
  - Introduced support for handling single-channel responses and updates, improving efficiency when syncing individual channels.

- **Bug Fixes**
  - Improved message processing to synchronize only the relevant channel when handling channel notification messages.

- **Documentation**
  - Updated public interfaces to reflect new methods and properties for single-channel synchronization and response handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/Sources/channel/ALChannelClientService.m b/Sources/channel/ALChannelClientService.m
index f9002586..38474083 100644
--- a/Sources/channel/ALChannelClientService.m
+++ b/Sources/channel/ALChannelClientService.m
@@ -19,6 +19,7 @@
 
 static NSString *const CHANNEL_INFO_URL = @"/rest/ws/group/info";
 static NSString *const CHANNEL_SYNC_URL = @"/rest/ws/group/v5/list";
+static NSString *const CHANNEL_INFO_SYNC_URL = @"/rest/ws/group/v2/info";
 static NSString *const CREATE_CHANNEL_URL = @"/rest/ws/group/v2.1/create";
 static NSString *const DELETE_CHANNEL_URL = @"/rest/ws/group/delete";
 static NSString *const LEFT_CHANNEL_URL = @"/rest/ws/group/left";
@@ -504,6 +505,67 @@ - (void)syncCallForChannel:(NSNumber *)updatedAt
     }];
 }
 
+#pragma mark - Specific Channel Sync
+
+- (void)syncCallForSpecificChannel:(NSNumber *)groupID
+              withFetchUserDetails:(BOOL)fetchUserDetails
+                     andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion {
+    NSString *syncChannelURLString = [NSString stringWithFormat:@"%@%@", KBASE_URL, CHANNEL_INFO_SYNC_URL];
+    NSString *syncChannelParamString = nil;
+
+    if (groupID != nil && groupID != NULL){
+        syncChannelParamString  = [NSString stringWithFormat:@"groupId=%@", groupID];
+    } else {
+        return;
+    }
+    
+    NSMutableURLRequest *syncChannelRequest = [ALRequestHandler createGETRequestWithUrlString:syncChannelURLString paramString:syncChannelParamString];
+
+    [self.responseHandler authenticateAndProcessRequest:syncChannelRequest andTag:@"CHANNEL_SYNCHRONIZATION" WithCompletionHandler:^(id theJson, NSError *error) {
+
+        ALSLog(ALLoggerSeverityInfo, @"CHANNEL_SYNCHRONIZATION_RESPONSE :: %@", (NSString *)theJson);
+        ALChannelSyncResponse *response = nil;
+        if (error) {
+            ALSLog(ALLoggerSeverityError, @"ERROR IN CHANNEL_SYNCHRONIZATION SERVER CALL REQUEST %@", error);
+            completion(error, nil);
+            return;
+        } else {
+            NSMutableArray *userNotPresentIds = [NSMutableArray new];
+            response = [[ALChannelSyncResponse alloc] initWithSingleChannelJSONString:theJson];
+            if ([response.status isEqualToString:AL_RESPONSE_SUCCESS]) {
+                if (fetchUserDetails) {
+                    ALContactService *contactService = [ALContactService new];
+                    if (response.alChannel) {
+                        for (NSString *userId in response.alChannel.membersName) {
+                            if (![contactService isContactExist:userId]){
+                                [userNotPresentIds addObject:userId];
+                            }
+                        }
+                    }
+
+                    if (userNotPresentIds.count>0) {
+                        ALUserService *alUserService = [ALUserService new];
+                        [alUserService fetchAndupdateUserDetails:userNotPresentIds withCompletion:^(NSMutableArray *userDetailArray, NSError *theError) {
+                            completion(error, response);
+                        }];
+                    } else {
+                        completion(error, response);
+                    }
+                } else {
+                    completion(error, response);
+                }
+            } else {
+                NSError *error = [NSError
+                                  errorWithDomain:@"KMCore"
+                                  code:1
+                                  userInfo:@{NSLocalizedDescriptionKey : @"Status fail in response"}];
+                completion(error, nil);
+                return;
+            }
+        }
+    }];
+}
+
 #pragma mark - Parent and sub groups method
 
 - (void)addChildKeyList:(NSMutableArray *)childKeyList
diff --git a/Sources/channel/ALChannelService.m b/Sources/channel/ALChannelService.m
index 923f48c3..8b2ded07 100644
--- a/Sources/channel/ALChannelService.m
+++ b/Sources/channel/ALChannelService.m
@@ -750,6 +750,19 @@ - (void)syncCallForChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate
 
 }
 
+- (void)syncCallForSpecificChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate
+                                    channelKey:(NSNumber *)channelKey {
+
+    [self.channelClientService syncCallForSpecificChannel:channelKey withFetchUserDetails:YES andCompletion:^(NSError *error, ALChannelSyncResponse *response) {
+        if (!error) {
+            [self createChannelAndUpdateInfo:response.alChannel withDelegate:delegate];
+            [[NSNotificationCenter defaultCenter] postNotificationName:@"UPDATE_CHANNEL_NAME" object:nil];
+            [[NSNotificationCenter defaultCenter] postNotificationName:@"UPDATE_CHANNEL_METADATA" object:nil];
+        }
+    }];
+
+}
+
 #pragma mark - Mark conversation as read
 
 - (void)markConversationAsRead:(NSNumber *)channelKey withCompletion:(void (^)(NSString *, NSError *))completion {
@@ -1271,6 +1284,22 @@ - (void)createChannelsAndUpdateInfo:(NSMutableArray *)channelArray withDelegate:
     }
 }
 
+- (void)createChannelAndUpdateInfo:(ALChannel *)channelObject withDelegate:(id<KommunicateUpdatesDelegate>)delegate {
+    // Ignore inserting un opened conversation(Which doesn't have user messages, only contains bot messages)
+    NSDictionary *metadata = channelObject.metadata;
+    if (metadata && metadata[AL_CHANNEL_CONVERSATION_STATUS] && [metadata[AL_CHANNEL_CONVERSATION_STATUS] isEqual:UN_OPENED_CONVERSATION_STATUS] ) {
+        return;
+    }
+    // Ignore inserting unread count in sync call
+    channelObject.unreadCount = 0;
+    [self createChannelEntry:channelObject fromMessageList:NO];
+    if (delegate) {
+        [delegate onChannelUpdated:channelObject];
+    }
+
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"Update_channel_Info" object:channelObject];
+}
+
 #pragma mark - List of Channels where Login user in Channel
 
 - (void)getListOfChannelWithCompletion:(void(^)(NSMutableArray *channelArray, NSError *error))completion {
diff --git a/Sources/channel/ALChannelSyncResponse.m b/Sources/channel/ALChannelSyncResponse.m
index accd8a35..b8c7be9b 100644
--- a/Sources/channel/ALChannelSyncResponse.m
+++ b/Sources/channel/ALChannelSyncResponse.m
@@ -31,4 +31,18 @@ - (instancetype)initWithJSONString:(NSString *)JSONString {
     
 }
 
+- (instancetype)initWithSingleChannelJSONString:(NSString *)JSONString {
+    self = [super initWithJSONString:JSONString];
+    self.alChannel = [[ALChannel alloc] init];
+    
+    if ([super.status isEqualToString: AL_RESPONSE_SUCCESS]) {
+        NSDictionary *response = [JSONString valueForKey:@"response"];
+        ALChannel *alChannel = [[ALChannel alloc] initWithDictonary:response];
+        self.alChannel = alChannel;
+        return self;
+    } else {
+        return nil;
+    }
+}
+
 @end
diff --git a/Sources/include/ALChannelClientService.h b/Sources/include/ALChannelClientService.h
index 8e102f20..fe463fda 100644
--- a/Sources/include/ALChannelClientService.h
+++ b/Sources/include/ALChannelClientService.h
@@ -87,6 +87,10 @@ static NSString *const GROUP_FETCH_BATCH_SIZE = @"100";
       withFetchUserDetails:(BOOL)fetchUserDetails
              andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion;
 
+- (void)syncCallForSpecificChannel:(NSNumber *)channelKey
+      withFetchUserDetails:(BOOL)fetchUserDetails
+             andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion;
+
 - (void)markConversationAsRead:(NSNumber *)channelKey withCompletion:(void (^)(NSString *, NSError *))completion;
 
 - (void)addChildKeyList:(NSMutableArray *)childKeyList
diff --git a/Sources/include/ALChannelService.h b/Sources/include/ALChannelService.h
index d5d7a269..b52568ff 100644
--- a/Sources/include/ALChannelService.h
+++ b/Sources/include/ALChannelService.h
@@ -492,6 +492,12 @@ extern NSString *const AL_MESSAGE_SYNC;
 /// @param delegate For real time updates callback will be triggered for channel update
 - (void)syncCallForChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate;
 
+/// This method is used for internal purpose.
+/// @param delegate For real time updates callback will be triggered for channel update
+/// @param channelKey For calling fetch API For Specific Channel
+- (void)syncCallForSpecificChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate
+                                    channelKey:(NSNumber *)channelKey;
+
 - (void)updateConversationReadWithGroupId:(NSNumber *)channelKey withDelegate:(id<KommunicateUpdatesDelegate>)delegate;
 
 /// This method is used for creating a channel.
diff --git a/Sources/include/ALChannelSyncResponse.h b/Sources/include/ALChannelSyncResponse.h
index a45778ca..9c734d71 100644
--- a/Sources/include/ALChannelSyncResponse.h
+++ b/Sources/include/ALChannelSyncResponse.h
@@ -14,6 +14,11 @@
 
 @property (nonatomic, strong) NSMutableArray *alChannelArray;
 
+@property (nonatomic, strong) ALChannel *alChannel;
+
 - (instancetype)initWithJSONString:(NSString *)JSONString;
 
+// Initializer for a single channel
+- (instancetype)initWithSingleChannelJSONString:(NSString *)JSONString;
+
 @end
diff --git a/Sources/message/ALMessageService.m b/Sources/message/ALMessageService.m
index 7090c497..b79374a9 100644
--- a/Sources/message/ALMessageService.m
+++ b/Sources/message/ALMessageService.m
@@ -447,7 +447,7 @@ + (void)processMessages:(NSMutableArray *)messageArray
                      postNotificationName:@"CONVERSATION_DELETION"
                      object:message.groupId];
                 }
-                [[ALChannelService sharedInstance] syncCallForChannelWithDelegate:delegate];
+                [[ALChannelService sharedInstance] syncCallForSpecificChannelWithDelegate:delegate channelKey: message.groupId];
             }
 
             [self resetUnreadCountAndUpdate:message];


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🧹 Nitpick comments (6)</summary><blockquote>

<details>
<summary>Sources/message/ALMessageService.m (1)</summary><blockquote>

`450-450`: **Consider fixing the spelling of "Spesific" to "Specific".**

The code change optimizes channel synchronization by only syncing the specific channel related to the notification message rather than all channels. However, there's a spelling error in the method name - "Spesific" should be "Specific".



```diff
-                [[ALChannelService sharedInstance] syncCallForSpesificChannelWithDelegate:delegate channelKey: message.groupId];
+                [[ALChannelService sharedInstance] syncCallForSpecificChannelWithDelegate:delegate channelKey: message.groupId];
```

</blockquote></details>
<details>
<summary>Sources/include/ALChannelService.h (1)</summary><blockquote>

`495-499`: **Fix spelling: "Spesific" should be "Specific".**

The new method declaration is correct in functionality, providing a more targeted way to sync a single channel. However, there's a spelling error in both the method name and documentation.



```diff
-/// This method is used for internal purpose.
-/// @param delegate For real time updates callback will be triggered for channel update
-/// @param channelKey For calling fetch API For Spesific Channel
-- (void)syncCallForSpesificChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate
+/// This method is used for internal purpose.
+/// @param delegate For real time updates callback will be triggered for channel update
+/// @param channelKey For calling fetch API For Specific Channel
+- (void)syncCallForSpecificChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate
                                    channelKey:(NSNumber *)channelKey;
```

</blockquote></details>
<details>
<summary>Sources/channel/ALChannelSyncResponse.m (1)</summary><blockquote>

`34-46`: **LGTM: Good implementation with a minor optimization possibility.**

The implementation correctly handles single channel JSON parsing. A small optimization could be made by directly assigning the created channel to the property.



```diff
- (instancetype)initWithSingleChannelJSONString:(NSString *)JSONString {
    self = [super initWithJSONString:JSONString];
    self.alChannel = [[ALChannel alloc] init];
    
    if ([super.status isEqualToString: AL_RESPONSE_SUCCESS]) {
        NSDictionary *response = [JSONString valueForKey:@"response"];
-        ALChannel *alChannel = [[ALChannel alloc] initWithDictonary:response];
-        self.alChannel = alChannel;
+        self.alChannel = [[ALChannel alloc] initWithDictonary:response];
        return self;
    } else {
        return nil;
    }
}
```

</blockquote></details>
<details>
<summary>Sources/include/ALChannelClientService.h (1)</summary><blockquote>

`90-92`: **Method name has misspelling: "Spesific" instead of "Specific"**

The new method declaration has a typo in its name. It should be "syncCallForSpecificChannel" rather than "syncCallForSpesificChannel".

```diff
-- (void)syncCallForSpesificChannel:(NSNumber *)channelKey
+- (void)syncCallForSpecificChannel:(NSNumber *)channelKey
      withFetchUserDetails:(BOOL)fetchUserDetails
             andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion;
```

</blockquote></details>
<details>
<summary>Sources/channel/ALChannelService.m (1)</summary><blockquote>

`753-764`: **Method name has misspelling: "Spesific" instead of "Specific"**

This method name contains a typo. It should be "syncCallForSpecificChannelWithDelegate" rather than "syncCallForSpesificChannelWithDelegate".

```diff
-- (void)syncCallForSpesificChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate
+- (void)syncCallForSpecificChannelWithDelegate:(id<KommunicateUpdatesDelegate>)delegate
                                    channelKey:(NSNumber *)channelKey {

-    [self.channelClientService syncCallForSpesificChannel:channelKey withFetchUserDetails:YES andCompletion:^(NSError *error, ALChannelSyncResponse *response) {
+    [self.channelClientService syncCallForSpecificChannel:channelKey withFetchUserDetails:YES andCompletion:^(NSError *error, ALChannelSyncResponse *response) {
        if (!error) {
            [self createChannelAndUpdateInfo:response.alChannel withDelegate:delegate];
            [[NSNotificationCenter defaultCenter] postNotificationName:@"UPDATE_CHANNEL_NAME" object:nil];
            [[NSNotificationCenter defaultCenter] postNotificationName:@"UPDATE_CHANNEL_METADATA" object:nil];
        }
    }];

}
```

</blockquote></details>
<details>
<summary>Sources/channel/ALChannelClientService.m (1)</summary><blockquote>

`508-509`: **Misspelled pragma mark comment**

The pragma mark has the same "Spesific" spelling error. It should be "Particular Channel Sync" or "Specific Channel Sync".

```diff
-#pragma mark - Perticular Channel Sync
+#pragma mark - Specific Channel Sync
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 1168f7930404589f3345b844cee0fe1ea6742722 and 2bf8834e3ed73fb89c174da59abbcbb655edd4e0.

</details>

<details>
<summary>📒 Files selected for processing (7)</summary>

* `Sources/channel/ALChannelClientService.m` (2 hunks)
* `Sources/channel/ALChannelService.m` (2 hunks)
* `Sources/channel/ALChannelSyncResponse.m` (1 hunks)
* `Sources/include/ALChannelClientService.h` (1 hunks)
* `Sources/include/ALChannelService.h` (1 hunks)
* `Sources/include/ALChannelSyncResponse.h` (1 hunks)
* `Sources/message/ALMessageService.m` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (6)</summary><blockquote>

<details>
<summary>Sources/include/ALChannelSyncResponse.h (2)</summary>

`17-17`: **LGTM: New property to store a single channel response.**

The addition of this property is appropriate for handling single channel sync responses.

---

`21-22`: **LGTM: New initializer for handling single channel JSON.**

This initializer complements the existing `initWithJSONString:` method and allows the class to parse responses for a single channel.

</details>
<details>
<summary>Sources/channel/ALChannelService.m (1)</summary>

`1287-1301`: **Well-factored implementation for single channel update**

This helper method properly handles a single channel update, following the same pattern as the existing method for multiple channels. Good job on maintaining consistency with the existing codebase while adding this new functionality.

</details>
<details>
<summary>Sources/channel/ALChannelClientService.m (3)</summary>

`22-22`: **New API endpoint constant added**

Good job defining the new endpoint as a constant, which is consistent with the rest of the codebase.

---

`516-520`: _⚠️ Potential issue_

**Logic issue in condition check**

The condition check is using OR (`||`) when it should be using AND (`&&`). The current logic will always evaluate to true because if `groupID` is `nil`, then `groupID != NULL` will be true, and vice versa.

```diff
-    if (groupID != nil || groupID != NULL){
+    if (groupID != nil && groupID != NULL){
        syncChannelParamString  = [NSString stringWithFormat:@"groupId=%@", groupID];
    } else {
        return;
    }
```



> Likely an incorrect or invalid review comment.

---

`534-534`: <details>
<summary>✅ Verification successful</summary>

**Verify ALChannelSyncResponse implementation**

This code calls `initWithSingleChannelJSONString:` which appears to be a new initializer for `ALChannelSyncResponse`. Make sure this initializer is properly implemented in the `ALChannelSyncResponse` class to handle the single channel JSON format correctly.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if the initWithSingleChannelJSONString: method exists in ALChannelSyncResponse
grep -r "initWithSingleChannelJSONString:" --include="*.h" --include="*.m" .
```

Length of output: 444

---

🏁 Script executed:

```shell
#!/bin/bash
# Show the initWithSingleChannelJSONString: implementation with surrounding context
grep -R -n -C5 "initWithSingleChannelJSONString" Sources/channel/ALChannelSyncResponse.m
```

Length of output: 464

---

🏁 Script executed:

```shell
#!/bin/bash
# Display the full initWithSingleChannelJSONString: method implementation for review
sed -n '1,200p' Sources/channel/ALChannelSyncResponse.m
```

Length of output: 1460

---

🏁 Script executed:

```shell
#!/bin/bash
# Show ALChannelSyncResponse header to inspect properties and comments
grep -R -n "interface ALChannelSyncResponse" -n Sources/include/ALChannelSyncResponse.h && sed -n '1,200p' Sources/include/ALChannelSyncResponse.h
```

Length of output: 769

---

🏁 Script executed:

```shell
#!/bin/bash
# Locate and display the API response header and implementation
grep -R -n "interface ALAPIResponse" -n Sources/include/ALAPIResponse.h
sed -n '1,200p' Sources/include/ALAPIResponse.h

grep -R -n "ALAPIResponse.m" -n .
# If found, show its implementation to see JSON parsing logic
sed -n '1,200p' Sources/`grep -R -l "ALAPIResponse" -n . | grep "ALAPIResponse.m"`
```

Length of output: 9408

---



</details>

**ALChannelSyncResponse single-channel initializer verified**  
The `-initWithSingleChannelJSONString:` method is declared in `Sources/include/ALChannelSyncResponse.h` and implemented in `Sources/channel/ALChannelSyncResponse.m`. It mirrors the array-based initializer—calling `super initWithJSONString:`, checking `status == AL_RESPONSE_SUCCESS`, and populating `self.alChannel`. No missing implementation or errors found; no further action required.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-06T10:22:47Z
user: login: KommunicateDeveloper
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T10:31:06Z
user: login: coderabbitai[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-06T10:31:28Z
user: login: adarshmishra
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T04:17:02Z

Review comments:
diff_hunk: @@ -504,6 +505,68 @@ - (void)syncCallForChannel:(NSNumber *)updatedAt
     }];
 }
 
+#pragma mark - Perticular Channel Sync
+
+- (void)syncCallForSpesificChannel:(NSNumber *)groupID
+              withFetchUserDetails:(BOOL)fetchUserDetails
+                     andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion {
+    NSString *syncChannelURLString = [NSString stringWithFormat:@"%@%@", KBASE_URL, CHANNEL_INFO_SYNC_URL];
+    NSString *syncChannelParamString = nil;
+
+    if (groupID != nil || groupID != NULL){
+        syncChannelParamString  = [NSString stringWithFormat:@"groupId=%@", groupID];
+    } else {
+        return;
+    }
+    
+    NSMutableURLRequest *syncChannelRequest = [ALRequestHandler createGETRequestWithUrlString:syncChannelURLString paramString:syncChannelParamString];
+
+    [self.responseHandler authenticateAndProcessRequest:syncChannelRequest andTag:@"CHANNEL_SYNCHRONIZATION" WithCompletionHandler:^(id theJson, NSError *error) {
+
+        ALSLog(ALLoggerSeverityInfo, @"CHANNEL_SYNCHRONIZATION_RESPONSE :: %@", (NSString *)theJson);
+        ALChannelSyncResponse *response = nil;
+        if (error) {
+            ALSLog(ALLoggerSeverityError, @"ERROR IN CHANNEL_SYNCHRONIZATION SERVER CALL REQUEST %@", error);
+            completion(error, nil);
+            return;
+        } else {
+            NSMutableArray *userNotPresentIds = [NSMutableArray new];
+            response = [[ALChannelSyncResponse alloc] initWithSingleChannelJSONString:theJson];
+            if ([response.status isEqualToString:AL_RESPONSE_SUCCESS]) {
+                if (fetchUserDetails) {
+                    ALContactService *contactService = [ALContactService new];
+                    for (ALChannel *channel in response.alChannelArray) {
+
+                        for (NSString *userId in channel.membersName) {
+                            if (![contactService isContactExist:userId]){
+                                [userNotPresentIds addObject:userId];
+                            }
+                        }
+                    }
+
+                    if (userNotPresentIds.count>0) {
+                        ALUserService *alUserService = [ALUserService new];
+                        [alUserService fetchAndupdateUserDetails:userNotPresentIds withCompletion:^(NSMutableArray *userDetailArray, NSError *theError) {
+                            completion(error, response);
+                        }];
+                    } else {
+                        completion(error, response);
+                    }
+                } else {
+                    completion(error, response);
+                }
+            } else {
+                NSError *error = [NSError
+                                  errorWithDomain:@"KMCore"
+                                  code:1
+                                  userInfo:@{NSLocalizedDescriptionKey : @"Status fail in response"}];
+                completion(error, nil);
+                return;
+            }
+        }
+    }];
+}
path: Sources/channel/ALChannelClientService.m
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Method name contains spelling error and implementation has potential issues**

This method implementation has a few issues:

1. The method name contains a typo: "Spesific" instead of "Specific"
2. When checking for a non-null groupID, the logic should use `!=` not `||`
3. The response handling still references `alChannelArray` (line 538) even though this endpoint returns a single channel


```diff
-- (void)syncCallForSpesificChannel:(NSNumber *)groupID
+- (void)syncCallForSpecificChannel:(NSNumber *)groupID
              withFetchUserDetails:(BOOL)fetchUserDetails
                     andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion {
    NSString *syncChannelURLString = [NSString stringWithFormat:@"%@%@", KBASE_URL, CHANNEL_INFO_SYNC_URL];
    NSString *syncChannelParamString = nil;

-    if (groupID != nil || groupID != NULL){
+    if (groupID != nil && groupID != NULL){
        syncChannelParamString  = [NSString stringWithFormat:@"groupId=%@", groupID];
    } else {
        return;
    }
    
    NSMutableURLRequest *syncChannelRequest = [ALRequestHandler createGETRequestWithUrlString:syncChannelURLString paramString:syncChannelParamString];

    [self.responseHandler authenticateAndProcessRequest:syncChannelRequest andTag:@"CHANNEL_SYNCHRONIZATION" WithCompletionHandler:^(id theJson, NSError *error) {

        ALSLog(ALLoggerSeverityInfo, @"CHANNEL_SYNCHRONIZATION_RESPONSE :: %@", (NSString *)theJson);
        ALChannelSyncResponse *response = nil;
        if (error) {
            ALSLog(ALLoggerSeverityError, @"ERROR IN CHANNEL_SYNCHRONIZATION SERVER CALL REQUEST %@", error);
            completion(error, nil);
            return;
        } else {
            NSMutableArray *userNotPresentIds = [NSMutableArray new];
            response = [[ALChannelSyncResponse alloc] initWithSingleChannelJSONString:theJson];
            if ([response.status isEqualToString:AL_RESPONSE_SUCCESS]) {
                if (fetchUserDetails) {
                    ALContactService *contactService = [ALContactService new];
+                    // Handle the single channel case properly
+                    if (response.alChannel) {
+                        for (NSString *userId in response.alChannel.membersName) {
+                            if (![contactService isContactExist:userId]){
+                                [userNotPresentIds addObject:userId];
+                            }
+                        }
-                    for (ALChannel *channel in response.alChannelArray) {
-
-                        for (NSString *userId in channel.membersName) {
-                            if (![contactService isContactExist:userId]){
-                                [userNotPresentIds addObject:userId];
-                            }
-                        }
                    }

                    if (userNotPresentIds.count>0) {
                        ALUserService *alUserService = [ALUserService new];
                        [alUserService fetchAndupdateUserDetails:userNotPresentIds withCompletion:^(NSMutableArray *userDetailArray, NSError *theError) {
                            completion(error, response);
                        }];
                    } else {
                        completion(error, response);
                    }
                } else {
                    completion(error, response);
                }
            } else {
                NSError *error = [NSError
                                  errorWithDomain:@"KMCore"
                                  code:1
                                  userInfo:@{NSLocalizedDescriptionKey : @"Status fail in response"}];
                completion(error, nil);
                return;
            }
        }
    }];
}
```

<!-- This is an auto-generated reply by CodeRabbit -->
created_at: 2025-05-06T10:22:46Z
author_association: NONE
diff_hunk: @@ -504,6 +505,68 @@ - (void)syncCallForChannel:(NSNumber *)updatedAt
     }];
 }
 
+#pragma mark - Perticular Channel Sync
+
+- (void)syncCallForSpesificChannel:(NSNumber *)groupID
+              withFetchUserDetails:(BOOL)fetchUserDetails
+                     andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion {
+    NSString *syncChannelURLString = [NSString stringWithFormat:@"%@%@", KBASE_URL, CHANNEL_INFO_SYNC_URL];
+    NSString *syncChannelParamString = nil;
+
+    if (groupID != nil || groupID != NULL){
+        syncChannelParamString  = [NSString stringWithFormat:@"groupId=%@", groupID];
+    } else {
+        return;
+    }
+    
+    NSMutableURLRequest *syncChannelRequest = [ALRequestHandler createGETRequestWithUrlString:syncChannelURLString paramString:syncChannelParamString];
+
+    [self.responseHandler authenticateAndProcessRequest:syncChannelRequest andTag:@"CHANNEL_SYNCHRONIZATION" WithCompletionHandler:^(id theJson, NSError *error) {
+
+        ALSLog(ALLoggerSeverityInfo, @"CHANNEL_SYNCHRONIZATION_RESPONSE :: %@", (NSString *)theJson);
+        ALChannelSyncResponse *response = nil;
+        if (error) {
+            ALSLog(ALLoggerSeverityError, @"ERROR IN CHANNEL_SYNCHRONIZATION SERVER CALL REQUEST %@", error);
+            completion(error, nil);
+            return;
+        } else {
+            NSMutableArray *userNotPresentIds = [NSMutableArray new];
+            response = [[ALChannelSyncResponse alloc] initWithSingleChannelJSONString:theJson];
+            if ([response.status isEqualToString:AL_RESPONSE_SUCCESS]) {
+                if (fetchUserDetails) {
+                    ALContactService *contactService = [ALContactService new];
+                    for (ALChannel *channel in response.alChannelArray) {
+
+                        for (NSString *userId in channel.membersName) {
+                            if (![contactService isContactExist:userId]){
+                                [userNotPresentIds addObject:userId];
+                            }
+                        }
+                    }
+
+                    if (userNotPresentIds.count>0) {
+                        ALUserService *alUserService = [ALUserService new];
+                        [alUserService fetchAndupdateUserDetails:userNotPresentIds withCompletion:^(NSMutableArray *userDetailArray, NSError *theError) {
+                            completion(error, response);
+                        }];
+                    } else {
+                        completion(error, response);
+                    }
+                } else {
+                    completion(error, response);
+                }
+            } else {
+                NSError *error = [NSError
+                                  errorWithDomain:@"KMCore"
+                                  code:1
+                                  userInfo:@{NSLocalizedDescriptionKey : @"Status fail in response"}];
+                completion(error, nil);
+                return;
+            }
+        }
+    }];
+}
path: Sources/channel/ALChannelClientService.m
user: login: KommunicateDeveloper
body: Updated 
created_at: 2025-05-06T10:31:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -504,6 +505,68 @@ - (void)syncCallForChannel:(NSNumber *)updatedAt
     }];
 }
 
+#pragma mark - Perticular Channel Sync
+
+- (void)syncCallForSpesificChannel:(NSNumber *)groupID
+              withFetchUserDetails:(BOOL)fetchUserDetails
+                     andCompletion:(void(^)(NSError *error, ALChannelSyncResponse *response))completion {
+    NSString *syncChannelURLString = [NSString stringWithFormat:@"%@%@", KBASE_URL, CHANNEL_INFO_SYNC_URL];
+    NSString *syncChannelParamString = nil;
+
+    if (groupID != nil || groupID != NULL){
+        syncChannelParamString  = [NSString stringWithFormat:@"groupId=%@", groupID];
+    } else {
+        return;
+    }
+    
+    NSMutableURLRequest *syncChannelRequest = [ALRequestHandler createGETRequestWithUrlString:syncChannelURLString paramString:syncChannelParamString];
+
+    [self.responseHandler authenticateAndProcessRequest:syncChannelRequest andTag:@"CHANNEL_SYNCHRONIZATION" WithCompletionHandler:^(id theJson, NSError *error) {
+
+        ALSLog(ALLoggerSeverityInfo, @"CHANNEL_SYNCHRONIZATION_RESPONSE :: %@", (NSString *)theJson);
+        ALChannelSyncResponse *response = nil;
+        if (error) {
+            ALSLog(ALLoggerSeverityError, @"ERROR IN CHANNEL_SYNCHRONIZATION SERVER CALL REQUEST %@", error);
+            completion(error, nil);
+            return;
+        } else {
+            NSMutableArray *userNotPresentIds = [NSMutableArray new];
+            response = [[ALChannelSyncResponse alloc] initWithSingleChannelJSONString:theJson];
+            if ([response.status isEqualToString:AL_RESPONSE_SUCCESS]) {
+                if (fetchUserDetails) {
+                    ALContactService *contactService = [ALContactService new];
+                    for (ALChannel *channel in response.alChannelArray) {
+
+                        for (NSString *userId in channel.membersName) {
+                            if (![contactService isContactExist:userId]){
+                                [userNotPresentIds addObject:userId];
+                            }
+                        }
+                    }
+
+                    if (userNotPresentIds.count>0) {
+                        ALUserService *alUserService = [ALUserService new];
+                        [alUserService fetchAndupdateUserDetails:userNotPresentIds withCompletion:^(NSMutableArray *userDetailArray, NSError *theError) {
+                            completion(error, response);
+                        }];
+                    } else {
+                        completion(error, response);
+                    }
+                } else {
+                    completion(error, response);
+                }
+            } else {
+                NSError *error = [NSError
+                                  errorWithDomain:@"KMCore"
+                                  code:1
+                                  userInfo:@{NSLocalizedDescriptionKey : @"Status fail in response"}];
+                completion(error, nil);
+                return;
+            }
+        }
+    }];
+}
path: Sources/channel/ALChannelClientService.m
user: login: coderabbitai[bot]
body: @AbhijeetRanjan308 Thanks for making the updates! The code should now be more robust with the fixed spelling, proper null checking logic, and correct handling of the single channel response.

---

<!-- This is an auto-generated comment: tweet message by coderabbit.ai -->

If you found this review helpful, would you consider giving us a shout-out on [X](https://twitter.com/intent/tweet?related=CodeRabbitAI&text=Fix%20typos%20%26%20logic%20bugs%20in%20your%20method%20names%20and%20condition%20checks!%20Properly%20handle%20single%20vs.%20array%20responses%20to%20avoid%20crashes.%20Boost%20code%20quality%20with%20%40coderabbitai%20%F0%9F%9B%A0%EF%B8%8F%F0%9F%9A%80%20Try%20it%20now!&url=https%3A%2F%2Fgithub.com%2FKommunicate-io%2FKommunicateCore-iOS-SDK%2Fpull%2F124%23discussion_r2075170435)?

Thank you for using CodeRabbit!

<!-- end of auto-generated comment: tweet message by coderabbit.ai -->



<!-- This is an auto-generated reply by CodeRabbit -->
created_at: 2025-05-06T10:31:28Z
author_association: NONE

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-05-06T10:19:11Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: skip review by coderabbit.ai -->

> [!IMPORTANT]
> ## Review skipped
> 
> Auto reviews are disabled on base/target branches other than the default branch.
> 
> 
> 
> Please check the settings in the CodeRabbit UI or the `.coderabbit.yaml` file in this repository. To trigger a single review, invoke the `@coderabbitai review` command.
> 
> You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file.

<!-- end of auto-generated comment: skip review by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The changes introduce new methods and properties to support synchronizing data for a specific channel by its ID. This includes updates to client and service classes, new initializers and properties for response handling, and modifications to message processing to use the new specific-channel sync logic.

## Changes

| File(s)                                                                 | Change Summary                                                                                                            |
|-------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| Sources/channel/ALChannelClientService.m<br>Sources/include/ALChannelClientService.h | Added a static URL constant and a new method to sync a specific channel by ID, with optional user details fetching and completion handling. |
| Sources/channel/ALChannelService.m<br>Sources/include/ALChannelService.h | Added methods to sync and update information for a specific channel, including delegate notifications and metadata updates. |
| Sources/channel/ALChannelSyncResponse.m<br>Sources/include/ALChannelSyncResponse.h | Added a property for a single channel object and an initializer for single-channel JSON responses.                        |
| Sources/message/ALMessageService.m                                      | Updated message processing to use the new specific-channel sync method when handling channel notification messages.        |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant MessageService
    participant ChannelService
    participant ChannelClientService
    participant Server
    participant Delegate

    MessageService->>ChannelService: syncCallForSpesificChannelWithDelegate(delegate, channelKey)
    ChannelService->>ChannelClientService: syncCallForSpesificChannel(channelKey, fetchUserDetails, completion)
    ChannelClientService->>Server: GET /rest/ws/group/v2/info?groupId=channelKey
    Server-->>ChannelClientService: JSON response (single channel)
    ChannelClientService->>ChannelService: completion(response)
    ChannelService->>ChannelService: createChannelAndUpdateInfo(channel, delegate)
    ChannelService->>Delegate: notify channel update
    ChannelService->>MessageService: (optional) post notifications
```

## Suggested reviewers

- adarshmishra

## Poem

> In the warren of code, a channel appears,  
> Now synced by its ID, with hops and with cheers.  
> One bunny, one group, all tidy and neat—  
> Updates and users, the loop is complete.  
> With a twitch of the nose and a wiggle of ear,  
> This sync brings the channels much closer, my dear!  
> 🐇✨

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAbQBhAFkwACYAFgAGAE4AXUgbEjRfaHg2SABBRER4Igw2DFCAZVxqbGQAVW5aag8AMS98AHdIRJqqGgAfFAB5RshGgBEAaWjIQbRkBwFmdRp6OTDYDzbKCoEEERJcG0whTABmDIAOdGRbSAxHAVOARnT+LC4I6QJYsZjYDDwBg9eL4fxgeCzMCLJZ+EjcfDVAguDQwYHMbRYBiwTCkFCAhBvOyoIEeHZEcbwfBYfAAM0OHgAagBWeayDAMCpWACSjCKvjItAx8AakFZFBYkAABsTqBoANZgiHwHoaJkAen8iFw+sGiH1DPw2G4+ok3P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ngR1L9xJ9G3JSjlAcZuRU2Ezh08gnGSkpePEUIJ+e97sGd5xaNZjB6uNODvYeDKJYjgphD2WBFsjpDoj8F4jGgdNb9NjTGseN9o1D5T5YZVwsg75xT3jkQvj/57JDm/j64oFf5gLuz4x+zBNGFRzkyJzO2LN5zbNSNTDXStzDN1DTNpz5obAVQch+WmROLpAkJmsrDH2PNuJfE+J3DrFz4CDZIjYQGNGk94opaK5yoPe3k+LPkNsHAbtQuGcI1d6fdTBuIVg1kmqDjs0LU7LoqqTXkBL7lnCCjzIYAbS8iQiIiujnUVZX0mj/xiQwcjQjQ5QqCYcvWFC4c200w0AwovQwo8Q5Q1rYyXZfa1E5IPG8+Hc/9eO3VwD3d3RvdAIOhJIzkBzsFBDTcspCr0Cz6WdzYsgRyU9YheIxw1Ba+rriTwUgS7ElZzLLSHdADUuj1vrEe8DitGDdOXZ3aip2G8DjaLp1Vy0qi1oGrGjOK8rrw5KxuxlM9K1etdUyYgBJVt8tyUT3wNUTIy6kir6VwVVRhy0qh4wS9XUHB32VAvgqhuhequI5hi9pwxSKzxa7h0aup29nKCovgjlh9saQtyGG5a1l9vTXT+5t9u1/T+1p755lGV5r9UA5hrF193T3FO5d0fYSzB0T+r799B1j9wz37bYb0Nhp9mJl2XMBMl5B17IC07Dnk1MfgaAdM/NTUzMWMKgbM2gHMhgaHA06gYchRiAYcJU24tAYcQ4h0FH3MUAKQAgrITwTw9waQJA9wdAAA7PcKyAIE8FkAwD8MJ2kN0NyFkKRwwKoAAGzcjch0C0ACcZDscGBUdgg0d0cMe9TER0Bhzgz6BAA= -->

<!-- internal state end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=Kommunicate-io/KommunicateCore-iOS-SDK&utm_content=124):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: KommunicateDeveloper
created_at: 2025-05-06T10:19:31Z
body: @coderabbitai review
author_association: CONTRIBUTOR
user: login: coderabbitai[bot]
created_at: 2025-05-06T10:19:36Z
body: <!-- This is an auto-generated reply by CodeRabbit -->
<details>
<summary>✅ Actions performed</summary>

Review triggered.

> Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

</details>
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-06T10:20:10Z
body: ✅ **iOS Lint Test Result**
Congratulations! Linter Check Passed Successfully 🎉
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-06T10:31:43Z
body: ✅ **iOS Lint Test Result**
Congratulations! Linter Check Passed Successfully 🎉
author_association: NONE