1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

Make lint pass

Although with slightly redundant doc :/
This commit is contained in:
David Baker
2016-08-15 18:55:09 +01:00
parent 0ba1a1dabc
commit 267e009ae3

View File

@@ -17,6 +17,14 @@ limitations under the License.
* @module pushprocessor
*/
/**
* Convert a list of actions into a object with the actions as keys and their values
* eg. [ 'notify', { set_tweak: 'sound', value: 'default' } ]
* becomes { notify: true, tweaks: { sound: 'default' } }
* @param {array} actionlist The actions list
*
* @return {object} A object with key 'notify' (true or false) and an object of actions
*/
function actionListToActionsObject(actionlist) {
var actionobj = { 'notify': false, 'tweaks': {} };
for (var i = 0; i < actionlist.length; ++i) {
@@ -29,7 +37,7 @@ function actionListToActionsObject(actionlist) {
}
}
return actionobj;
};
}
/**
* Construct a Push Processor.
@@ -298,4 +306,11 @@ function PushProcessor(client) {
/** The PushProcessor class. */
module.exports = PushProcessor;
/**
* See above
* @param {array} actionlist The actions list
*
* @return {object} See above
*/
module.exports.actionListToActionsObject = actionListToActionsObject;