Inherits from NSObject
Conforms to NSCoding
NSCopying
Declared in QBChatDialog.h

Tasks

Properties

ID

@property (nonatomic, retain, readonly) NSString *ID
Discussion

Object ID

Declared In

QBChatDialog.h

createdAt

@property (nonatomic, retain) NSDate *createdAt
Discussion

Created date

Declared In

QBChatDialog.h

data

@property (nonatomic, retain) NSDictionary *data
Discussion

The dictionary with data

Declared In

QBChatDialog.h

lastMessageDate

@property (nonatomic, retain) NSDate *lastMessageDate
Discussion

Date of last message in private or group chat

Declared In

QBChatDialog.h

lastMessageText

@property (nonatomic, retain) NSString *lastMessageText
Discussion

Last message text in private or group chat

Declared In

QBChatDialog.h

lastMessageUserID

@property (nonatomic, assign) NSUInteger lastMessageUserID
Discussion

User ID of last opponent in private or group chat

Declared In

QBChatDialog.h

name

@property (nonatomic, retain) NSString *name
Discussion

Group chat name. If chat type is private, name will be nil

Declared In

QBChatDialog.h

occupantIDs

@property (nonatomic, retain) NSArray *occupantIDs
Discussion

Array of user ids in chat. For private chat count = 2

Declared In

QBChatDialog.h

onJoin

@property (nonatomic, copy) QBChatDialogStatusBlock onJoin
Discussion

Fired when user joined to room.

Declared In

QBChatDialog.h

onJoinFailed

@property (nonatomic, copy) QBChatDialogJoinFailedBlock onJoinFailed
Discussion

Fired when join to room failed (in most cases if user is not added to the room)

Declared In

QBChatDialog.h

onJoinOccupant

@property (nonatomic, copy) QBChatDialogOccupantJoinBlock onJoinOccupant
Discussion

Fired when occupant joined to dialog.

Declared In

QBChatDialog.h

onLeave

@property (nonatomic, copy) QBChatDialogStatusBlock onLeave
Discussion

Fired when user left room.

Declared In

QBChatDialog.h

onLeaveOccupant

@property (nonatomic, copy) QBChatDialogOccupantLeaveBlock onLeaveOccupant
Discussion

Fired when occupant left dialog.

Declared In

QBChatDialog.h

onReceiveListOfOnlineUsers

@property (nonatomic, copy) QBChatDialogRequestOnlineUsersBlock onReceiveListOfOnlineUsers
Discussion

Fired when list of online users received.

Declared In

QBChatDialog.h

onUpdateOccupant

@property (nonatomic, copy) QBChatDialogOccupantUpdateBlock onUpdateOccupant
Discussion

Fired when occupant was update in dialog.

Declared In

QBChatDialog.h

onUserIsTyping

@property (nonatomic, copy) QBChatDialogIsTypingBlock onUserIsTyping
Discussion

Fired when user is typing in dialog.

Declared In

QBChatDialog.h

onUserStoppedTyping

@property (nonatomic, copy) QBChatDialogStoppedTypingBlock onUserStoppedTyping
Discussion

Fired when user stopped typing in dialog.

Declared In

QBChatDialog.h

photo

@property (nonatomic, retain) NSString *photo
Discussion

Group chat photo. Can contain a link to a file in Content module, Custom Objects module or just a web link.

Declared In

QBChatDialog.h

recipientID

@property (nonatomic, readonly) NSInteger recipientID
Discussion

ID of a recipient if type = QBChatDialogTypePrivate. -1 otherwise.

Declared In

QBChatDialog.h

roomJID

@property (nonatomic, retain) NSString *roomJID
Discussion

Room JID. If private chat, room JID will be nil

Declared In

QBChatDialog.h

type

@property (nonatomic, readonly) QBChatDialogType type
Discussion

Chat type: Private/Group/PublicGroup

Declared In

QBChatDialog.h

unreadMessagesCount

@property (nonatomic, assign) NSUInteger unreadMessagesCount
Discussion

Number of unread messages in this dialog

Declared In

QBChatDialog.h

userID

@property (nonatomic, assign) NSUInteger userID
Discussion

Dialog owner

Declared In

QBChatDialog.h

Class Methods

new

+ (id)new

Instance Methods

clearDialogOccupantsStatusBlock

- (void)clearDialogOccupantsStatusBlock
Discussion

Clears dialog occupants status blocks. Call this method if you don’t want to recieve join/leave/update for this dialog.

Declared In

QBChatDialog.h

clearTypingStatusBlocks

- (void)clearTypingStatusBlocks
Discussion

Clears typing status blocks. Call this method if you don’t want to recieve typing statuses for this dialog.

Declared In

QBChatDialog.h

init

- (id)init

initWithDialogID:type:

- (instancetype)initWithDialogID:(NSString *)dialogID type:(enum QBChatDialogType)type
Discussion

Constructor

Declared In

QBChatDialog.h

isJoined

- (BOOL)isJoined
Discussion

Join status of room

Return Value

YES if user is joined to room, otherwise - no.

Declared In

QBChatDialog.h

join

- (BOOL)join
Discussion

Join to room. ‘onJoin’ block will be called.

Return Value

YES if the request was sent successfully. If not - see log.

Declared In

QBChatDialog.h

leave

- (BOOL)leave
Discussion

Leave joined room. ‘onLeave’ block will be called.

Return Value

YES if the request was sent successfully. If not - see log.

Declared In

QBChatDialog.h

pullOccupantsIDs

- (NSArray *)pullOccupantsIDs

pushOccupantsIDs

- (NSArray *)pushOccupantsIDs

requestOnlineUsers

- (BOOL)requestOnlineUsers
Discussion

Requests users who are joined to room. ‘onReceiveListOfOnlineUsers’ block will be called.

Return Value

YES if the request was sent successfully. If not - see log.

Declared In

QBChatDialog.h

sendGroupChatMessageWithoutJoin:

- (BOOL)sendGroupChatMessageWithoutJoin:(QBChatMessage *)message
Discussion

Available only for ‘Enterprise’ clients. Send group chat message to room, without room join

Parameters

message

Chat message to send

Return Value

YES if the request was sent successfully. If not - see log.

Declared In

QBChatDialog.h

sendMessage:

- (BOOL)sendMessage:(QBChatMessage *)message
Discussion

Send chat message to dialog.

Parameters

message

Chat message to send.

Return Value

YES if the message was sent. If not - see log.

Declared In

QBChatDialog.h

sendMessage:sentBlock:

- (BOOL)sendMessage:(QBChatMessage *)message sentBlock:(void ( ^ ) ( NSError *error ))sentBlock
Discussion

Send chat message with sent block

Parameters

message

Chat message to send

sentBlock

The block which informs whether a message was delivered to server or not. nil if no errors.

Return Value

YES if the message was sent. If not - see log.

Declared In

QBChatDialog.h

sendUserIsTyping

- (void)sendUserIsTyping
Discussion

Send is typing message to occupants.

Declared In

QBChatDialog.h

sendUserStoppedTyping

- (void)sendUserStoppedTyping
Discussion

Send stopped typing message to occupants.

Declared In

QBChatDialog.h

setOnJoin:

- (void)setOnJoin:(QBChatDialogStatusBlock)anOnJoin

setOnJoinFailed:

- (void)setOnJoinFailed:(QBChatDialogJoinFailedBlock)anOnJoinFailed

setOnJoinOccupant:

- (void)setOnJoinOccupant:(QBChatDialogOccupantJoinBlock)onJoinOccupant

setOnLeave:

- (void)setOnLeave:(QBChatDialogStatusBlock)anOnLeave

setOnLeaveOccupant:

- (void)setOnLeaveOccupant:(QBChatDialogOccupantLeaveBlock)onLeaveOccupant

setOnReceiveListOfOnlineUsers:

- (void)setOnReceiveListOfOnlineUsers:(QBChatDialogRequestOnlineUsersBlock)anOnReceiveListOfOnlineUsers

setOnUpdateOccupant:

- (void)setOnUpdateOccupant:(QBChatDialogOccupantUpdateBlock)onUpdateOccupant

setOnUserIsTyping:

- (void)setOnUserIsTyping:(QBChatDialogIsTypingBlock)anOnUserIsTyping

setOnUserStoppedTyping:

- (void)setOnUserStoppedTyping:(QBChatDialogStoppedTypingBlock)anOnUserStoppedTyping

setPullOccupantsIDs:

- (void)setPullOccupantsIDs:(NSArray *)occupantsIDs
Discussion

Occupants ids to pull. Use for update dialog

Declared In

QBChatDialog.h

setPushOccupantsIDs:

- (void)setPushOccupantsIDs:(NSArray *)occupantsIDs
Discussion

Occupants ids to push. Use for update dialog

Declared In

QBChatDialog.h