Table of Contents

onList()

wrtc.onList() is an event function called when lists are stored to or retrieved from the central IXNX server.

Lists are different types of data that a client might want to store at a secure, central location so it survives power off. The stored data is supposed to be as little as possible, a few KB at most. Or it might be a list that the IXNX server generated by itself, containing data clients might request.

Arguments

wrtc.onList(type, list, data, error)

If no error argument error is empty.

data format

The format of the JSON structure returned in argument data depends on the list's name in argument list:

list: call_log

When reporting list of calls user has made or received the retrieved JSON structure in data has the following format:

{last_id:…, data:[{…},{…},…]}

There:

list: msg_log

When reporting list of chat messages user has sent or received the retrieved JSON structure in data has the following format:

{last_id:…, data:[{…},{…},…]}

There:

Return value

Ignored.

Example

To fetch the list of calls user has made call wrtc.getList("call_log").

It will trigger an answer:

wrtc.onList("get_list", "call_log", {last_id:85632, data:[{id:50372, time:1647016200,from:"adam",to:"david",durtn:23}, {id:85632, time:1647016300,from:"david",to:"peter",durtn:0}]})

Also See

wrtc.getList()

wrtc.setList()