TapTalk.io Documentation
  • Introduction
  • OneTalk Omnichannel Documentation
    • Getting Started with OneTalk
      • Team Members
      • Add Topic
      • Assign Agent to Topic
      • Paid Proactive Chat
    • Channel Integration
      • Telegram Integration
      • WhatsApp SME Integration
      • Instagram DM Integration
      • Facebook Messenger Integration
      • Live Chat Integration (iOS, Android, Web)
        • OneTalk Live Chat for Android
          • Get Started
          • Event Listener
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for iOS
          • Get Started
          • Background Process in TapTalk.io Omnichannel iOS
          • Event Delegate
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for Web
          • Get Started
          • Callback
          • Method
        • OneTalk Live Chat for React Native
          • Get Started - Android
          • Authentication - Android
          • Get Started - iOS
          • Authentication - iOS
        • OneTalk Live Chat for Flutter
          • Get Started - Android
          • Get Started - iOS
      • Google Business Messages Integration
      • Google Business Profile Integration
      • Tokopedia Integration
    • Integration API
      • Inbox API
      • User/Contact API
    • Live Chat Widget Callback Function
    • Social Channel Button
    • Custom Chatbot Integration
      • Get Started
      • Edit or Delete Chatbot
      • Development
    • QnA via API
    • Webhook
  • PowerTalk Chat SDK Documentation
    • Getting Started with PowerTalk
    • PowerTalk Android
      • Get Started
      • Enable Chat Features
      • Authentication
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Connection
      • Event Listener
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk iOS
      • Get Started
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Implement Application Delegate
      • Authentication
      • Connection
      • Event Delegate
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk React Native
      • Get Started - Android
      • Get Started - iOS
    • PowerTalk Flutter
      • Get Started - Android
      • Get Started - iOS
    • Javascript SDK
      • Get Started
      • Authentication
      • Connection
      • General
      • Event Listener
      • User
      • Room List
      • Chat Room
      • Messages
      • Contact
      • Message Type
    • Server API
      • Get Started
      • Base URL
      • Authentication
      • User
      • Contact
      • Message
      • Room
    • Webhook
      • Get Started
      • Webhook Payload
  • MeetTalk SDK Documentation
    • Getting Started with MeetTalk
    • MeetTalk Android
      • Get Started
      • Event Listener
    • MeetTalk iOS
      • Get Started
      • Implement Application Delegate
      • Event Delegate
  • SendTalk API Documentation
    • Introduction
    • Whatsapp Verification
Powered by GitBook
On this page
  • Get Updated Room List
  • Get Room List From Cache
  • Fetch New Message
  • Search Local Room List
  • Mark Chat Room as Unread
  • Remove Unread Mark from Chat Room
  • Get Marked as Unread Chat Room List
  • Mute/Unmute Chat Room
  • Get Muted Chat Rooms
  • Pin/Unpin Chat Room
  • Get Pinned Chat Rooms

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. PowerTalk iOS
  3. Room List

Room List - TapCore

If you are using core implementation type, you can manage the application's chat room list with the following methods:

Note: Please add #import <TapTalk/TapCoreRoomListManager.h> before using these methods.

TapTalk Room List Method

Description

Call this method to fetch the latest room list data from the server and update to the local cache.

Call this method to retrieve list of room data obtained from the local cache.

Call this method to fetch new/updated messages that have not yet been received by the device

Call this method to search room lists from the device's local storage with a keyword

​Adds the chat room ID to the marked as unread chat room list​

Removes chat room ID from the marked as unread chat room list​

​Retrieve the list of chat room IDs that has been marked as unread

Mute selected chat rooms until a specified time

Retrieve the list of muted chat room IDs and their respective mute expiry time

Add or remove the chat room ID to pinned chat room list

Retrieve list of pinned chat room IDs from the server

Get Updated Room List

Call this method to fetch the latest room list data from the server and update to the local cache.

#import <TapTalk/TapCoreRoomListManager.h>
  
[[TAPCoreRoomListManager sharedManager] getUpdatedRoomListWithSuccess:^(NSArray<TAPRoomListModel *> * _Nonnull roomListArray) {
    // Successfully fetched updated room list data
}
failure:^(NSError * _Nonnull error) {
    // Failed to get updated room list data
}];

Get Room List From Cache

Call this method to retrieve list of room data obtained from the local cache.this method to fetch the latest room list data from the server and update to the local cache.

#import <TapTalk/TapCoreRoomListManager.h>
  
[[TAPCoreRoomListManager sharedManager] getRoomListFromCacheWithSuccess:^(NSArray<TAPRoomListModel *> * _Nonnull roomListResultArray) {
    // Successfully fetched room list data
}
failure:^(NSError * _Nonnull error) {
    // Failed to get room list data
}];

Fetch New Message

Call this method to fetch new/updated messages that have not yet been received by the device. Can be used to retrieve pending messages when the device goes back online after an offline state.

#import <TapTalk/TapCoreRoomListManager.h>
  
[[TAPCoreRoomListManager sharedManager] fetchNewMessagesWithSuccess:^(NSArray<TAPMessageModel *> * _Nonnull messageArray) {
    // Returns list of messages received by the user while the device is offline
}
failure:^(NSError * _Nonnull error) {
    // Failed to get messages
}];

Search Local Room List

Call this method to search room lists from the device's local storage with a keyword. Provided keyword will be used to filter room name in the search result.

#import <TapTalk/TapCoreRoomListManager.h>
  
[[TAPCoreRoomListManager sharedManager] searchLocalRoomListWithKeyword:KEYWORD
success:^(NSArray<TAPRoomListModel *> * _Nonnull roomListResultArray) {
    // Returns filtered room lists obtained from cache
}
failure:^(NSError * _Nonnull error) {
    // Failed to get room list data
}];

Parameters KEYWORD: (String) search keyword to filter room name

Mark Chat Room as Unread

Call this method to add the selected chat room ID to the marked as unread chat room list.

#import <TapTalk/TapCoreRoomListManager.h>

// Mark single chat room as unread
[[TAPCoreRoomListManager sharedManager] markChatRoomAsUnreadWithRoomID:ROOM_ID 
success:^{
    // Successfully marked chat room as unread
} 
failure:^(NSError * _Nonnull error) {
        
}];


// Mark multiple chat rooms as unread
[[TAPCoreRoomListManager sharedManager] markChatRoomsAsUnreadWithRoomID:ROOM_IDS 
success:^{
    // Successfully marked chat rooms as unread
} 
failure:^(NSError * _Nonnull error) {
        
}];

Parameters ROOM_ID: (String) ID of the target room ROOM_IDS: (Array<String>) array containing IDs of target rooms

Remove Unread Mark from Chat Room

Call this method to remove the selected chat room ID from the marked as unread chat room list.

#import <TapTalk/TapCoreRoomListManager.h>

// Remove unread mark from single chat room
[[TAPCoreRoomListManager sharedManager] removeUnreadMarkFromChatRoom:ROOM_ID 
success:^{
    // Successfully removed unread mark from chat room
} 
failure:^(NSError * _Nonnull error) {
        
}];


// Remove unread mark from multiple chat rooms
[[TAPCoreRoomListManager sharedManager] removeUnreadMarkFromChatRooms:ROOM_IDS 
success:^{
    // Successfully removed unread mark from chat rooms
} 
failure:^(NSError * _Nonnull error) {
        
}];

Parameters ROOM_ID: (NSString) ID of the target room ROOM_IDS: (NSArray<NsSString>) array containing IDs of target rooms

Get Marked as Unread Chat Room List

Call this method to retrieve the list of chat room IDs that has been marked as unread.

#import <TapTalk/TapCoreRoomListManager.h>

[[TAPCoreRoomListManager sharedManager] getMarkedAsUnreadChatRoomListWithSuccess:^(NSArray * _Nonnull unreadRoomIDs) {
    // Returns list of roomID that has been marked as unread
} 
failure:^(NSError * _Nonnull error) {
    
}];

Mute/Unmute Chat Room

Call these methods to mute the selected chat rooms until a specified time. Active user will not receive notifications from muted chat rooms.

#import <TapTalk/TapCoreRoomListManager.h>

// Mute a single chat room
[[TAPCoreRoomListManager sharedManager] muteChatRoomWithRoomID:ROOM_ID 
                                                     expiredAt:EXPIRED_AT
success:^{
    // Successfully muted chat room
} 
failure:^(NSError * _Nonnull error) {
        
}];

// Mute multiple chat rooms
[[TAPCoreRoomListManager sharedManager] muteChatRoomsWithRoomIDs:ROOM_IDS
                                                       expiredAt:EXPIRED_AT
success:^{
    // Successfully muted chat rooms
} 
failure:^(NSError * _Nonnull error) {
        
}];

Parameters ROOM_ID: (NSString) ID of the target room ROOM_IDS: (NSArray<NsSString>) array containing IDs of target rooms EXPIRED_AT: (NSNumber) chat room will stay muted until this time, fill with 0 to mute the room forever or until the room is unmuted

To return chat rooms to its normal state and continue retrieving notifications, use unmuteChatRoomWithRoomID: method.

#import <TapTalk/TapCoreRoomListManager.h>

// Unmute a single chat room
[[TAPCoreRoomListManager sharedManager] unmuteChatRoomWithRoomID:ROOM_ID 
success:^(NSArray *roomIDs) {
    // Successfully unmuted chat room
} 
failure:^(NSError * _Nonnull error) {
        
}];

// Unmute multiple chat rooms
[[TAPCoreRoomListManager sharedManager] unmuteChatRoomsWithRoomIDs:ROOM_IDS
success:^(NSArray *roomIDs) {
    // Successfully unmuted chat rooms
} 
failure:^(NSError * _Nonnull error) {
        
}];

Parameters ROOM_ID: (NSString) ID of the target room ROOM_IDS: (NSArray<NsSString>) array containing IDs of target rooms

Get Muted Chat Rooms

Retrieve the list of muted chat room IDs and their respective mute expiry time.

#import <TapTalk/TapCoreRoomListManager.h>

[[TAPCoreRoomListManager sharedManager] getMutedChatRoomListWithSuccess:^(NSMutableArray<TAPMutedRoomModel *> *mutedRoomListArray) {
    // Returns list of TAPMutedRoomModel which contains 
    // roomID and expiry time of the muted chat rooms
} 
failure:^(NSError * _Nonnull error) {
    
}];

Pin/Unpin Chat Room

You may call pinChatRoomWithRoomID: to add or remove the chat room ID to pinned chat room list. Chat rooms pinned by the user are generally shown on top of the chat room list. You can later retrieve the list of pinned chat room IDs with getPinnedChatRoomIDs.

#import <TapTalk/TapCoreRoomListManager.h>

// Pin a single chat room
[[TAPCoreRoomListManager sharedManager] pinChatRoomWithRoomID:ROOM_ID 
success:^(NSArray *roomIDs) {
    // Successfully pinned chat room
} 
failure:^(NSError * _Nonnull error) {
        
}];

// Pin multiple chat rooms
[[TAPCoreRoomListManager sharedManager] pinChatRoomsWithRoomIDs:ROOM_IDS
success:^(NSArray *roomIDs) {
    // Successfully pinned chat rooms
} 
failure:^(NSError * _Nonnull error) {
        
}];

Use unpinChatRoomWithRoomID: to remove existing pinned chat room ID from the pinned chat room list.

#import <TapTalk/TapCoreRoomListManager.h>

// Unpin a single chat room
[[TAPCoreRoomListManager sharedManager] unpinChatRoomWithRoomID:ROOM_ID 
success:^(NSArray *roomIDs) {
    // Successfully unpinned chat room
} 
failure:^(NSError * _Nonnull error) {
        
}];

// Pin multiple chat rooms
[[TAPCoreRoomListManager sharedManager] unpinChatRoomsWithRoomIDs:ROOM_IDS
success:^(NSArray *roomIDs) {
    // Successfully unpinned chat rooms
} 
failure:^(NSError * _Nonnull error) {
        
}];

Parameters ROOM_ID: (NSString) ID of the target room ROOM_IDS: (NSArray<NsSString>) array containing IDs of target rooms

Get Pinned Chat Rooms

You can retrieve the list of the active user's pinned chat room IDs from the server with getPinnedChatRoomIDs.

#import <TapTalk/TapCoreRoomListManager.h>

[[TAPCoreRoomListManager sharedManager] getPinnedChatRoomIDsWithSuccess:^(NSArray *pinnedRoomIDs) {
    // Returns list of roomID of the active user's pinned chat rooms
} 
failure:^(NSError * _Nonnull error) {
    
}];
PreviousRoom List - TapUINextChat Room and Messages

Last updated 28 days ago

Was this helpful?

Get Updated Room List
Get Room List From Cache
Fetch New Message
Search Local Room List
​Mark Chat Room as Unread
​Remove Unread Mark from Chat Room​
Get Marked as Unread Chat Room List
Mute/Unmute Chat Room
Get Muted Chat Rooms
Pin/Unpin Chat Room
Get Pinned Chat Rooms