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

Tasks

Other Methods

Deprecated Methods

  •   chatRoom

    Returns an autoreleased instance of QBChatRoom to join if type = QBChatDialogTypeGroup or QBChatDialogTypePublicGroup. nil otherwise.

    property

Properties

ID

@property (nonatomic, retain) NSString *ID
Discussion

Object ID

Declared In

QBChatDialog.h

chatRoom

@property (nonatomic, readonly) QBChatRoom *chatRoom
Discussion

Returns an autoreleased instance of QBChatRoom to join if type = QBChatDialogTypeGroup or QBChatDialogTypePublicGroup. nil otherwise.

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

onLeave

@property (nonatomic, copy) QBChatDialogStatusBlock onLeave
Discussion

Fired when user left room.

Declared In

QBChatDialog.h

onReceiveListOfOnlineUsers

@property (nonatomic, copy) QBChatDialogRequestOnlineUsersBlock onReceiveListOfOnlineUsers
Discussion

Fired when list of online users received.

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) 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

Instance Methods

initWithDialogID:

- (instancetype)initWithDialogID:(NSString *)dialogID
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

setOnJoin:

- (void)setOnJoin:(QBChatDialogStatusBlock)anOnJoin

setOnJoinFailed:

- (void)setOnJoinFailed:(QBChatDialogJoinFailedBlock)anOnJoinFailed

setOnLeave:

- (void)setOnLeave:(QBChatDialogStatusBlock)anOnLeave

setOnReceiveListOfOnlineUsers:

- (void)setOnReceiveListOfOnlineUsers:(QBChatDialogRequestOnlineUsersBlock)anOnReceiveListOfOnlineUsers

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