@@ -99,15 +99,6 @@ QiscusCore.login(withIdentityToken: identityToken, completion: { (result, error)
9999})
100100```
101101
102- ## QiscusHeartBeat
103-
104- HeartBeat is something like your heart and every TimeInterval (default is 30s) QiscusCore will check connectivity to RealtimeServer. If you decide to server, QiscusCore will activate the sync sync automatically. and you can set time intervals, but we recommend more than 5/10 (s) to optimize resources.
105-
106- ```
107- // interval in seconds
108- QiscusCore.setSync(interval: 10)
109- ```
110-
111102## Message
112103
113104### send message
@@ -206,105 +197,6 @@ Get comments by room id
206197 let comments : [CommentModel]? = QiscusCore.database.comment.find(roomId: "123")
207198```
208199
209- ## Event/Delegate
210-
211- ### QiscusCoreDelegate
212-
213- QiscusCoreDelegate all event provide by qiscuscore will presented here.
214-
215- ```
216- public protocol QiscusCoreDelegate {
217-
218- /// new comment is comming
219- ///
220- /// - Parameters:
221- /// - room: room where event happen
222- /// - comment: new comment object
223- func onRoom(_ room: RoomModel, gotNewComment comment: CommentModel)
224-
225- /// comment status change
226- ///
227- /// - Parameters:
228- /// - room: room where event happen
229- /// - comment: new comment where status is change, you can compare from local data
230- /// - status: comment status, exp: deliverd, receipt, or read.
231- /// special case for read, for example we have message 1,2,3,4,5 then you got status change for message 5 it's mean message 1-4 has been read
232- func onRoom(_ room: RoomModel, didChangeComment comment: CommentModel, changeStatus status: CommentStatus)
233-
234- // MARK: User Event in Room
235-
236- /// User Typing Indicator
237- ///
238- /// - Parameters:
239- /// - room: room where event happen
240- /// - user: object user or participant
241- /// - typing: true if user start typing and false when finish typing. typing time avarange is 5-10s, we assume user typing is finish after that
242- func onRoom(_ room: RoomModel, thisParticipant user: MemberModel, isTyping typing: Bool)
243-
244- /// Room update
245- ///
246- /// - Parameter room: new room object
247- func onRoom(update room: RoomModel)
248-
249- /// User Online status
250- ///
251- /// - Parameters:
252- /// - user: object member
253- /// - status: true if user login
254- /// - time: millisecond UTC
255- func onChange(user: MemberModel, isOnline online: Bool, at time: Date)
256-
257- func gotNew(room: RoomModel)
258-
259- func remove(room: RoomModel)
260- }
261- ```
262-
263- ### QiscusRoomDelegate
264-
265- You can listen event only on specific room with QiscusCoreRoomDelegate.
266-
267- ```
268- public protocol QiscusCoreRoomDelegate {
269-
270- /// new comment is comming
271- ///
272- /// - Parameters:
273- /// - comment: new comment object
274- func gotNewComment(comment: CommentModel)
275-
276- /// comment status change
277- ///
278- /// - Parameters:
279- /// - comment: new comment where status is change, you can compare from local data
280- /// - status: comment status, exp: deliverd, receipt, or read.
281- /// special case for read, for example we have message 1,2,3,4,5 then you got status change for message 5 it's mean message 1-4 has been read
282- func didComment(comment: CommentModel, changeStatus status: CommentStatus)
283-
284- // MARK: User Event in Room
285-
286- /// User Typing Indicator
287- ///
288- /// - Parameters:
289- /// - user: object user or participant
290- /// - typing: true if user start typing and false when finish typing. typing time avarange is 5-10s, we assume user typing is finish after that
291- func onRoom(thisParticipant user: MemberModel, isTyping typing: Bool)
292-
293- /// User Online status
294- ///
295- /// - Parameters:
296- /// - user: object member
297- /// - status: true if user login
298- /// - time: millisecond UTC
299- func onChangeUser(_ user: MemberModel, onlineStatus status: Bool, whenTime time: Date)
300-
301- /// Room update
302- ///
303- /// - Parameter room: new room object
304- func onRoom(update room: RoomModel)
305- }
306- ```
307-
308200## File Management
309201
310202### Upload
0 commit comments