#import <TapTalk/TapUI.h>
//Add TapUIDelegate declaration
@interface ViewController () <TapUIChatRoomDelegate>
@implementation ViewController
//Set TapUI delegate to current
[[TapUI sharedInstance] setChatRoomDelegate:self];
#pragma mark TapUIChatRoom
// Called when a chat room is opened.
- (void)tapTalkChatRoomDidOpen:(TAPRoomModel *)room
currentViewController:(UIViewController *)currentViewController
currentShownNavigationController:(UINavigationController *)currentNavigationController {
// Called when a chat room is closed.
- (void)tapTalkChatRoomDidClose:(TAPRoomModel *)room
currentViewController:(UIViewController *)currentViewController
currentShownNavigationController:(UINavigationController *)currentNavigationController {
// Called when active user sends any message to a chat room.
- (void)tapTalkActiveUserDidSendMessage:(TAPMessageModel *)message
room:(TAPRoomModel *)room
currentViewController:(UIViewController *)currentViewController
currentShownNavigationController:(UINavigationController *)currentNavigationController {
// Called when user click the profile button on the top right side of the personal chat room view.
- (void)tapTalkChatRoomProfileButtonTapped:(UIViewController *)currentViewController
otherUser:(TAPUserModel *)otherUser
room:(TAPRoomModel *)room
currentShownNavigationController:(UINavigationController *)currentNavigationController {
// Called when user click the profile button on the top right side of the group chat room view.
- (void)tapTalkGroupChatRoomProfileButtonTapped:(UIViewController *)currentViewController
room:(TAPRoomModel *)room
currentShownNavigationController:(UINavigationController *)currentNavigationController {
// Called when user click the profile button on user in group.
- (void)tapTalkGroupMemberAvatarTappedWithRoom:(TAPRoomModel *)room
user:(TAPUserModel *)user
currentShownNavigationController:(UINavigationController *)currentNavigationController {
// Called when user click mention in the bubble chat.
- (void)tapTalkUserMentionTappedWithRoom:(TAPRoomModel *)room
mentionedUser:(TAPUserModel *)mentionedUser
isRoomParticipant:(BOOL)isRoomParticipant
message:(TAPMessageModel *)message
currentViewController:(UIViewController *)currentViewController
currentShownNavigationController:(UINavigationController *)currentNavigationController {
// Called when user click the quote view that appears in the chat bubble.
- (void)tapTalkMessageQuoteTappedWithUserInfo:(NSDictionary *)userInfo {