Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat sdk master #362

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e89401a
Localization on chat history
Nov 20, 2018
59df814
changes in chat contacts and layout
Jan 15, 2019
cb79219
Navigation changes
Jan 22, 2019
5950b3c
handled local chat inside app
Jan 30, 2019
a99036d
Fixes as per required designs
Feb 7, 2019
0254af4
Added online status
Feb 13, 2019
6adbb46
Profile picture
Feb 22, 2019
abf4858
Pull from main chat branch
Feb 22, 2019
2ebe25c
Updated Chat view
Feb 28, 2019
bb98732
Chatsdk version 3.9.5
Mar 15, 2019
df1e7c3
Added version number in .podspec file
Mar 19, 2019
51f1a47
Updated lib version
Mar 19, 2019
1861f42
Changed adapter version
Mar 19, 2019
9f2ec54
Changed version of adapter
Mar 19, 2019
f6d9230
Changed version
Mar 20, 2019
168ff82
Updated to latest
Apr 8, 2019
0422d9b
Added user online/offline status
May 21, 2019
6143809
Update from chatsdk master
May 30, 2019
cd09c2a
update from main chatsdk
May 30, 2019
e260202
Main chat merge
May 30, 2019
e5071e2
Localized some strings
Jun 14, 2019
bc93ed4
Deleted .orig files
Jun 14, 2019
b7dbad5
Updated ChatSDKFirebase
Jun 14, 2019
f15dea1
updated chatsdk firebase
Jun 14, 2019
47aebec
Chatsdk changes
Jun 17, 2019
025e65e
changed added icons path
Jun 20, 2019
1c23cd7
replaced chatsdk icon
Jun 20, 2019
d5e5b71
Support for group chat
Jul 2, 2019
55b145c
Support for group chat
Jul 2, 2019
475bab5
Group chat - options inside chat controller
Jul 5, 2019
2768b94
Group chat support
Jul 12, 2019
96c9973
No limit on length of chat messages
Jul 12, 2019
fd23742
Merge branch 'master' into group_chat
Jul 15, 2019
4082004
Merge pull request #3 from hoopit/group_chat
kiranSDM Jul 15, 2019
36b6378
Commented group support
Jul 15, 2019
6a3ed4d
master pull
Jul 15, 2019
8f7aa17
del chat if chat is empty
Jul 16, 2019
85cde1e
Added EmptyView xib under ChatUI
Jul 16, 2019
0307f7e
fixed height issue inside chat screen
Jul 16, 2019
e1fcf78
Extra space in chat detail
Jul 18, 2019
e311543
IOS2-842
Jul 18, 2019
0094e3b
Norwegian translation
Jul 31, 2019
81f76cb
Merged latest chatsdk branch
Sep 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed ChatSDKCore/Assets/.gitkeep
Empty file.
Empty file removed ChatSDKCore/Classes/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions ChatSDKCore/Classes/Categories/NSDate+Additions.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ -(NSString *) threadTimeAgo {
// We check if the last date was in the last few days
// Then check if it was exactly yesterday
if ([self daysAgo] < 3 && today.day == otherDay.day + 1) {
time = [NSBundle t: bYesterday];
time = [NSBundle t: NSLocalizedString(bYesterday, nil)];
}
else if (self.daysAgo > 1 && self.daysAgo < 7) {
[formatter setDateFormat:@"EEEE"];
Expand Down Expand Up @@ -62,10 +62,10 @@ -(NSString *) dateAgo {
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];

if (self.isToday) {
day = [NSBundle t: bToday];
day = [NSBundle t: NSLocalizedString(bToday, nil)];
}
else if (self.isYesterday) {
day = [NSBundle t: bYesterday];
day = [NSBundle t: NSLocalizedString(bYesterday, nil)];
}
else if (self.daysAgo < 7) {
[formatter setDateFormat:@"EEE"];
Expand Down
4 changes: 4 additions & 0 deletions ChatSDKCore/Classes/Entities/PMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ typedef enum {
bMessageTypeSticker = 6,
bMessageTypeFile = 7,
bMessageTypeCustom = 99,
bMessageTypeLeaveConversation = 8,
bMessageTypeAddedMember = 9,
bMessageTypeGroupRenamed = 10,

} bMessageType;

typedef enum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
-(id<PThread>) createThreadWithUsers: (NSArray *) users name: (NSString *) name type: (bThreadType) type;

-(RXPromise *) prepareSendMessage: (id<PMessage>) messageModel;

-(RXPromise *) updateThread: (id<PThread>) threadModel dataPushed: (void(^)(NSError * error, id<PThread> thread)) dataPushed;
@end
6 changes: 6 additions & 0 deletions ChatSDKCore/Classes/Handlers/Abstract/BAbstractCoreHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,17 @@ -(RXPromise *) createThreadWithUsers: (NSArray *) users
threadCreated:threadCreated];
}

-(RXPromise *) updateThread: (id<PThread>) threadModel dataPushed: (void(^)(NSError * error, id<PThread> thread)) dataPushed {
return [self updateThread:threadModel dataPushed:dataPushed];
}


-(RXPromise *) createThreadWithUsers: (NSArray *) users
threadCreated: (void(^)(NSError * error, id<PThread> thread)) threadCreated {
return [self createThreadWithUsers:users name:nil threadCreated:threadCreated];
}


/**
* @brief Add users to a thread
*/
Expand Down
2 changes: 1 addition & 1 deletion ChatSDKCore/Classes/Hooks/BBaseHookHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ -(BHook *) addHook: (BHook *) hook withName: (NSString *) name {
if(!existingHooks) {
existingHooks = [NSMutableArray new];
}
if(![existingHooks containsObject:hook]) {
if(![existingHooks containsObject:hook] && hook != nil) {
[existingHooks addObject:hook];
}
_hooks[name] = existingHooks;
Expand Down
5 changes: 5 additions & 0 deletions ChatSDKCore/Classes/Session/BConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@
@property (nonatomic, readwrite) UIFont * threadTimeFont;
@property (nonatomic, readwrite) UIFont * threadSubtitleFont;

@property (nonatomic, readwrite) UIFont * unreadThreadTitleFont;
@property (nonatomic, readwrite) UIFont * unreadThreadTimeFont;
@property (nonatomic, readwrite) UIFont * unreadThreadSubtitleFont;

@property (nonatomic, readwrite) NSString * threadNameColor;
@property (nonatomic, readwrite) BOOL locationMessagesEnabled;
@property (nonatomic, readwrite) BOOL imageMessagesEnabled;

Expand Down
27 changes: 16 additions & 11 deletions ChatSDKCore/Classes/UI/NSBundle+Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
#define bThreadCreationError @"bThreadCreationError"
#define bSearchTerm @"bSearchTerm"

#define bPickFriends @"bPickFriends"
#define bPickFriends @"NewChat"
#define bInviteFriend @"Invite"

#define bBack @"bBack"
#define bBack @"Back"
#define bImageSaved @"bImageSaved"
#define bOpenInMaps @"bOpenInMaps"
#define bLocation @"bLocation"
#define bCompose @"bCompose"
#define bCompose @"Create"
#define bCreateGroup @"bCreateGroup"

#define bLoadingFriends @"bLoadingFriends"
Expand Down Expand Up @@ -76,11 +77,11 @@
#define bChooseExistingPhoto @"bChooseExistingPhoto"
#define bChooseExistingVideo @"bChooseExistingVideo"
#define bCurrentLocation @"bCurrentLocation"
#define bSend @"bSend"
#define bSend @"SEND"
#define bOpen @"bOpen"
#define bReply @"bReply"
#define bRec @"bRec"
#define bWriteSomething @"bWriteSomething"
#define bWriteSomething @"type_something"
#define bSlideToCancel @"bSlideToCancel"
#define bFlagged @"bFlagged"
#define bFlag @"bFlag"
Expand All @@ -101,7 +102,7 @@
#define bInviteBySMS @"bInviteBySMS"

#define bTo @"bTo"
#define bEnterNamesHere @"bEnterNamesHere"
#define bEnterNamesHere @"SearchMembers" //@"bEnterNamesHere"
#define bSearchedContacts @"bSearchedContacts"
#define bNearbyContacts @"bNearbyContacts"

Expand All @@ -123,8 +124,8 @@
#define bDeletePicture @"bDeletePicture"
#define bSetAsDefaultPicture @"bSetAsDefaultPicture"
#define bDeleteLastPictureWarning @"bDeleteLastPictureWarning"
#define bDone @"bDone"
#define bEdit @"bEdit"
#define bDone @"Done"
#define bEdit @"Edit"
#define b_Ago @"b_Ago"

#define bRemoveFriend @"bRemoveFriend"
Expand All @@ -137,12 +138,12 @@

#define bTermsAndConditions @"bTermsAndConditions"

#define bNoMessages @"bNoMessages"
#define bNoMessages @"no_messages"
#define bNoNewUsersFoundForThisSearch @"bNoNewUsersFoundForThisSearch"
#define bLastSeen_at_ @"bLastSeen_at_"
#define b_at_ @"b_at_"
#define bToday @"Today"
#define bYesterday @"Yesterday"
#define bToday @"today"
#define bYesterday @"yesterday"
#define bYouLeftTheGroup @"bYouLeftTheGroup"
#define bYouJoinedTheGroup @"bYouJoinedTheGroup"
#define bRejoinGroup @"bRejoinGroup"
Expand Down Expand Up @@ -184,6 +185,10 @@
#define bVideoMessage @"bVideoMessage"
#define bStickerMessage @"bStickerMessage"
#define bFileMessage @"bFileMessage"
#define bProfilePictures @"bProfilePictures"
#define bDeletePicture @"bDeletePicture"
#define bSetAsDefaultPicture @"bSetAsDefaultPicture"
#define bDeleteLastPictureWarning @"bDeleteLastPictureWarning"

#define bAvailable @"bAvailable"
#define bAway @"bAway"
Expand Down
210 changes: 210 additions & 0 deletions ChatSDKCore/Classes/UI/NSBundle+Core.h.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
//
// NSBundle+Core.h
// Pods
//
// Created by Benjamin Smiley-andrews on 12/07/2017.
//
//

#import <Foundation/Foundation.h>

#define bLogout @"bLogout"
#define bSettings @"bSettings"
#define bAuthenticating @"bAuthenticating"
#define bLogginIn @"bLogginIn"
#define bErrorTitle @"bErrorTitle"
#define bContacts @"bContacts"
#define bConversations @"bConversations"
#define bBroadcast @"bBroadcast"
//#define bThread @"bThread"
#define bChatRooms @"bChatRooms"
#define bThreadCreationError @"bThreadCreationError"
#define bSearchTerm @"bSearchTerm"

#define bPickFriends @"NewChat"
#define bInviteFriend @"Invite"

#define bBack @"Back"
#define bImageSaved @"bImageSaved"
#define bOpenInMaps @"bOpenInMaps"
#define bLocation @"bLocation"
#define bCompose @"Create"
#define bCreateGroup @"bCreateGroup"

#define bLoadingFriends @"bLoadingFriends"
#define bLoading @"bLoading"
#define bErrorLoadingFriends @"bErrorLoadingFriends"

#define bInvalidSelection @"bInvalidSelection"
#define bSelectAtLeastOneFriend @"bSelectAtLeastOneFriend"

#define bInviteFriendsFromFacebook @"bInviteFriendsFromFacebook"
#define bFriendsAdded_i @"bFriendsAdded_i"

#define bSuccess @"bSuccess"
#define bAdded @"bAdded"

#define bAdd @"bAdd"
#define bCreatingThread @"bCreatingThread"
#define bLogoutErrorTitle @"bLogoutErrorTitle"

#define bSearch @"bSearch"
#define bSearching @"bSearching"
#define bNoNearbyUsers @"bNoNearbyUsers"

#define bAddUsers @"bAddUsers"

#define bOnline @"online"
<<<<<<< HEAD
#define bOffline @"bOffline"
=======
#define bOffline @"offline"
>>>>>>> ba622d8b140a9791dcf57da71313e8792eb58a33

#define bCreatePublicThread @"bCreatePublicThread"
#define bThreadName @"bThreadName"
#define bCancel @"bCancel"
#define bOk @"bOk"
#define bReset @"bReset"
#define bLogin @"bLogin"
#define bRegister @"bRegister"
#define bPassword @"bPassword"
#define bForgotPassword @"bForgotPassword"
#define bEnterCredentialToResetPassword @"bEnterCredentialToResetPassword"
#define bPasswordResetSuccess @"bPasswordResetSuccess"
#define bUnableToCreateThread @"bUnableToCreateThread"
#define bChat @"bChat"
#define bOptions @"bOptions"
#define bTakePhoto @"bTakePhoto"
#define bTakeVideo @"bTakeVideo"
#define bTakePhotoOrVideo @"bTakePhotoOrVideo"
#define bChooseExistingPhoto @"bChooseExistingPhoto"
#define bChooseExistingVideo @"bChooseExistingVideo"
#define bCurrentLocation @"bCurrentLocation"
#define bSend @"SEND"
#define bOpen @"bOpen"
#define bReply @"bReply"
#define bRec @"bRec"
#define bWriteSomething @"type_something"
#define bSlideToCancel @"bSlideToCancel"
#define bFlagged @"bFlagged"
#define bFlag @"bFlag"
#define bDelete @"bDelete"
#define bUnflag @"bUnflag"
#define bHoldToSendAudioMessageError @"bHoldToSendAudioMessageError"
#define bRecording @"bRecording"
#define bSecondsRemaining_ @"bSecondsRemaining_"
#define bAudioLengthLimitReached @"bAudioLengthLimitReached"
#define bSendOrDiscardRecording @"bSendOrDiscardRecording"

#define bCancelled @"bCancelled"
#define bSave @"bSave"
#define bSaving @"bSaving"
#define bGroupName @"bGroupName"
#define bInviteByEmail @"bInviteByEmail"
#define bInviteContact @"bInviteContact"
#define bInviteBySMS @"bInviteBySMS"

#define bTo @"bTo"
#define bEnterNamesHere @"SearchMembers" //@"bEnterNamesHere"
#define bSearchedContacts @"bSearchedContacts"
#define bNearbyContacts @"bNearbyContacts"

#define bName @"bName"
#define bPhoneNumber @"bPhoneNumber"
#define bEmail @"bEmail"
#define bDetails @"bDetails"
#define bAddParticipant @"bAddParticipant"
#define bLeaveConversation @"bLeaveConversation"
#define bRejoinConversation @"bRejoinConversation"
#define bParticipants @"bParticipants"
#define bActiveParticipants @"bActiveParticipants"
#define bNoActiveParticipants @"bNoActiveParticipants"
#define bTapHereForContactInfo @"bTapHereForContactInfo"

#define bProfile @"bProfile"
#define bProfilePictures @"bProfilePictures"
#define bAddPictures @"bAddPicture"
#define bDeletePicture @"bDeletePicture"
#define bSetAsDefaultPicture @"bSetAsDefaultPicture"
#define bDeleteLastPictureWarning @"bDeleteLastPictureWarning"
#define bDone @"Done"
#define bEdit @"Edit"
#define b_Ago @"b_Ago"

#define bRemoveFriend @"bRemoveFriend"
#define bAddFriend @"bAddFriend"
#define bAddContact @"bAddContact"
#define bUnblock @"bUnblock"
#define bBlock @"bBlock"
#define b_LeftTheGroup @"b_LeftTheGroup"
#define b_JoinedTheGroup @"b_JoinedTheGroup"

#define bTermsAndConditions @"bTermsAndConditions"

#define bNoMessages @"no_messages"
#define bNoNewUsersFoundForThisSearch @"bNoNewUsersFoundForThisSearch"
#define bLastSeen_at_ @"bLastSeen_at_"
#define b_at_ @"b_at_"
#define bToday @"today"
#define bYesterday @"yesterday"
#define bYouLeftTheGroup @"bYouLeftTheGroup"
#define bYouJoinedTheGroup @"bYouJoinedTheGroup"
#define bRejoinGroup @"bRejoinGroup"

#define bDefaultThreadName @"bDefaultThreadName"

#define bDeleteContact @"bDeleteContact"
#define bDeleteContactMessage @"bDeleteContactMessage"

#define bTyping @"bTyping"
#define bCamera @"bCamera"
#define bPhoto @"bPhoto"
#define bChoosePhoto @"bChoosePhoto"
#define bChooseVideo @"bChooseVideo"
#define bSticker @"bSticker"
#define bFile @"bFile"
#define bRefreshingUsers @"bRefreshingUsers"
#define bMessageBurst @"bMessageBurst"

#define bSelectYourSearch @"bSelectYourSearch"
#define bPhonebook @"bPhonebook"
#define bSearchWithName @"bSearchWithName"
#define bWarning @"bWarning"
#define bYouMustEnableContactPermissionsToUseThisFunctionalityEnableInTheSettingsApp @"bYouMustEnableContactPermissionsToUseThisFunctionalityEnableInTheSettingsApp"

#define bImageMessagesNotSupported @"bImageMessagesNotSupported"
#define bAudioMessagesNotSupported @"bAudioMessagesNotSupported"
#define bStickerMessagesNotSupported @"bStickerMessagesNotSupported"
#define bFileMessagesNotSupported @"bFileMessagesNotSupported"
#define bLocationMessagesNotSupported @"bLocationMessagesNotSupported"
#define bVideoMessagesNotSupported @"bVideoMessagesNotSupported"

#define bBlock @"bBlock"
#define bUnblock @"bUnblock"

#define bImageMessage @"bImageMessage"
#define bLocationMessage @"bLocationMessage"
#define bAudioMessage @"bAudioMessage"
#define bVideoMessage @"bVideoMessage"
#define bStickerMessage @"bStickerMessage"
#define bFileMessage @"bFileMessage"
#define bProfilePictures @"bProfilePictures"
#define bDeletePicture @"bDeletePicture"
#define bSetAsDefaultPicture @"bSetAsDefaultPicture"
#define bDeleteLastPictureWarning @"bDeleteLastPictureWarning"

#define bAvailable @"bAvailable"
#define bAway @"bAway"
#define bExtendedAway @"bExtendedAway"
#define bBusy @"bBusy"

@protocol PMessage;

@interface NSBundle(ChatCore)

+(NSBundle *) coreBundle;
+(NSString *) t: (NSString *) string;
+(NSString *) textForMessage: (id<PMessage>) message;

@end
Loading