com.innovaphone.discussion

The com.innovaphone.discussion published in the model an URL, which can be used to include a messages iframe. This way a messages discussion can be added to any item in an app. The link to an item in the App is done with tags assigned to the discussion window.

consumeApi

The client consumeApi function is used to access the Api:

var dis = start.consumeApi("com.innovaphone.discussion")

openDiscussion

The URL to open the iframe is fond in info of the provider model

var model = dis.model[dis.providers[0]];
    if (model) {
        if (model.url && model.info && model.info.url) {
            var url = model.url.slice(0, model.url.lastIndexOf("/") + 1) + model.info.url + "?name=" + dis.providers[0] + "&topic=" + <appname> + "&scheme=dark&tag=" + <appitem>
        }
    }

The following information is includeded in the URL

model.url
The URL of the provider. This should be used for the URL expect for the file part
model.info.url
The relative URL of the discussion. Use this as filename combined with the URL of the provider

The following URL arguments shall be used for the discussion

name
The name of the provider. Typically discussion.providers[0] can be used
topic
The topic to which the messages are posted. The user needs to have access to the topic. This is the case if as topic the sip uri of the App which uses this, is used
scheme
Color scheme, darlk or light
tag
tag(s) used to link the discussion to an item within the App. This argument can be used multiple times to use multiple tags which are included all in the message posts.