Skip to content

Commit

Permalink
Release v9.3.1
Browse files Browse the repository at this point in the history
Release v9.3.1
  • Loading branch information
yeskay-zohocorp committed Jul 1, 2024
1 parent 9bf3d5c commit f916948
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![SupportedLanguages](https://img.shields.io/badge/Platforms-iOS%20%7C%20%20Android-green.svg)](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-installation.html) [![Version](https://img.shields.io/badge/version-9.3.0-blue.svg)](https://mobilisten.io/) [![Mobilisten NPM CD](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/workflows/Mobilisten%20NPM%20CD/badge.svg)](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/actions)
[![SupportedLanguages](https://img.shields.io/badge/Platforms-iOS%20%7C%20%20Android-green.svg)](https://www.zoho.com/salesiq/help/developer-section/react-native-sdk-installation.html) [![Version](https://img.shields.io/badge/version-9.3.1-blue.svg)](https://mobilisten.io/) [![Mobilisten NPM CD](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/workflows/Mobilisten%20NPM%20CD/badge.svg)](https://github.com/zoho/SalesIQ-Mobilisten-ReactNative/actions)

# React Native module for SalesIQ Mobilisten SDK

Expand Down
68 changes: 34 additions & 34 deletions ios/RNZohoSalesIQ.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ - (void)performAdditionalSetup{
}

- (void)sendEventName:(NSString *)eventName body:(id)body {
if (hasListeners) {
if (hasSIQEventListener) {
NSLog(@"CustomEventsEmitter sendEventName emitting event: %@", eventName);
[self sendEventWithName:eventName body:body];
} else {
Expand Down Expand Up @@ -62,15 +62,15 @@ - (void)sendEventName:(NSString *)eventName body:(id)body {
[self performAdditionalSetup];
}

bool hasListeners;
bool hasSIQEventListener;
bool handleURI = YES;

-(void)startObserving {
hasListeners = YES;
hasSIQEventListener = YES;
}

-(void)stopObserving {
hasListeners = NO;
hasSIQEventListener = NO;
}

//MARK:- EVENT TYPES
Expand Down Expand Up @@ -1888,112 +1888,112 @@ - (NSMutableDictionary *)getNotificationActionPayload:(id)payload {

//MARK:- DELEGATE METHODS - EVENTS
- (void)agentsOffline {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:OPERATORS_OFFLINE body:[NSNull null]];
}

- (void)agentsOnline {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:OPERATORS_ONLINE body:[NSNull null]];
}

- (void)chatViewClosedWithId:(NSString * _Nullable)id {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHATVIEW_CLOSED body:id];
}

- (void)chatViewOpenedWithId:(NSString * _Nullable)id {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHATVIEW_OPENED body:id];
}

- (void)homeViewClosed {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:HOMEVIEW_CLOSED body:[NSNull null]];
}

- (void)homeViewOpened {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:HOMEVIEW_OPENED body:[NSNull null]];
}

- (void)supportClosed {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:SUPPORT_CLOSED body:[NSNull null]];
}

- (void)supportOpened {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:SUPPORT_OPENED body:[NSNull null]];
}

- (void)articleClosedWithId:(NSString * _Nullable)id {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:ARTICLE_CLOSED body:id];
}

- (void)articleDislikedWithId:(NSString * _Nullable)id {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:ARTICLE_DISLIKED body:id];
}

- (void)articleLikedWithId:(NSString * _Nullable)id {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:ARTICLE_LIKED body:id];
}

- (void)articleOpenedWithId:(NSString * _Nullable)id {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:ARTICLE_OPENED body:id];
}

- (void)chatAttendedWithChat:(SIQVisitorChat * _Nullable)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHAT_ATTENDED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)chatClosedWithChat:(SIQVisitorChat * _Nullable)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHAT_CLOSED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)chatFeedbackRecievedWithChat:(SIQVisitorChat * _Nullable)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:FEEDBACK_RECEIVED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)chatMissedWithChat:(SIQVisitorChat * _Nullable)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHAT_MISSED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)chatOpenedWithChat:(SIQVisitorChat * _Nullable)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHAT_OPENED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)chatQueuePositionChangedWithChat:(SIQVisitorChat *)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHAT_QUEUE_POSITION_CHANGED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)chatRatingRecievedWithChat:(SIQVisitorChat * _Nullable)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:RATING_RECEIVED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)chatReopenedWithChat:(SIQVisitorChat * _Nullable)chat {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHAT_REOPENED body: [RNZohoSalesIQ getChatObject:chat]];
}

- (void)unreadCountChanged:(NSInteger)count {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:CHAT_UNREAD_COUNT_CHANGED body: @(count)];
}

- (void)visitorIPBlocked {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:VISITOR_IPBLOCKED body:[NSNull null]];
}

Expand All @@ -2006,7 +2006,7 @@ - (BOOL)shouldOpenURL:(NSURL *)url in:(SIQVisitorChat * _Nullable)chat {
}

- (void) handleTriggerWithName:(NSString *)name visitorInformation:(SIQVisitor *)visitorInformation{
if (hasListeners){
if (hasSIQEventListener){

NSMutableDictionary *triggerInformation = [NSMutableDictionary dictionary];

Expand All @@ -2026,48 +2026,48 @@ - (void) handleTriggerWithName:(NSString *)name visitorInformation:(SIQVisitor *
}

- (void)handleBotTrigger {
if (hasListeners)
if (hasSIQEventListener)
[self sendEventWithName:BOT_TRIGGER body:[NSNull null]];
}

- (void)handleResourceOpened:(enum SIQResourceType)type resource:(SIQKnowledgeBaseResource * _Nullable)resource {
if (hasListeners) {
if (hasSIQEventListener) {
NSMutableDictionary *resourceInformation = [self prepareResourceInformation:type resource:resource];
[self sendEventWithName:EVENT_RESOURCE_OPENED body: resourceInformation];
}
}

- (void)handleResourceClosed:(enum SIQResourceType)type resource:(SIQKnowledgeBaseResource * _Nullable)resource {
if (hasListeners) {
if (hasSIQEventListener) {
NSMutableDictionary *resourceInformation = [self prepareResourceInformation:type resource:resource];
[self sendEventWithName:EVENT_RESOURCE_CLOSED body: resourceInformation];
}
}


- (void)handleResourceLiked:(enum SIQResourceType)type resource:(SIQKnowledgeBaseResource * _Nullable)resource {
if (hasListeners) {
if (hasSIQEventListener) {
NSMutableDictionary *resourceInformation = [self prepareResourceInformation:type resource:resource];
[self sendEventWithName:EVENT_RESOURCE_LIKED body: resourceInformation];
}
}

- (void)handleResourceDisliked:(enum SIQResourceType)type resource:(SIQKnowledgeBaseResource * _Nullable)resource {
if (hasListeners) {
if (hasSIQEventListener) {
NSMutableDictionary *resourceInformation = [self prepareResourceInformation:type resource:resource];
[self sendEventWithName:EVENT_RESOURCE_DISLIKED body: resourceInformation];
}
}

- (void)handleCustomLauncherVisibility:(BOOL)visible {
if (hasListeners) {
if (hasSIQEventListener) {
NSNumber *visibleLauncher = [NSNumber numberWithBool:visible];
[self sendEventWithName:EVENT_HANDLE_CUSTOM_LAUNCHER_VISIBILITY body: visibleLauncher];
}
}

- (void)handleNotificationAction:(SalesIQNotificationPayload *)payload {
if (hasListeners) {
if (hasSIQEventListener) {
NSMutableDictionary *resultMap = [self getNotificationActionPayload:payload];
[self sendEventWithName:EVENT_NOTIFICATION_CLICKED body: resultMap];
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-zohosalesiq-mobilisten",
"version": "9.3.0",
"version": "9.3.1",
"description": "A React Native module for the ZohoSalesIQ Mobilisten SDK",
"bugs": {
"email": "[email protected]"
Expand Down

0 comments on commit f916948

Please sign in to comment.