Multi stanza response (#43)
Closed
Bartosz Małkowski opened 4 years ago

Allow to handle multi stanza responses. Like in MAM: single IQ stanza requests for history. Server starts sending many Message stanzas and at the end server sends result IQ stanza for initial request. It will be nice if all those messages can be handled by single handler added to Request.

Bartosz Małkowski commented 4 years ago

Now it is possible to add consumer to some requests. For example it is supported by MAMModule:

mamModule.query(start = Date().time - 7 * 86400000, rsm = q).response { res ->
	res.onSuccess {
		println("Complete: ${it.complete}")
	}
}.consume { fs: ForwardedStanza<Message> ->
	println("Received $fs")
}.send()

So instead of listening MAMMessageEvent developer can use consume{}. Of course event still will be fired!

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Spent time
8h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_libraries/halcyon#43
Please wait...
Page is in error, reload to recover