You've already forked matrix-js-sdk
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:
@@ -17,6 +17,14 @@ limitations under the License.
|
|||||||
* @module pushprocessor
|
* @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) {
|
function actionListToActionsObject(actionlist) {
|
||||||
var actionobj = { 'notify': false, 'tweaks': {} };
|
var actionobj = { 'notify': false, 'tweaks': {} };
|
||||||
for (var i = 0; i < actionlist.length; ++i) {
|
for (var i = 0; i < actionlist.length; ++i) {
|
||||||
@@ -29,7 +37,7 @@ function actionListToActionsObject(actionlist) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return actionobj;
|
return actionobj;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a Push Processor.
|
* Construct a Push Processor.
|
||||||
@@ -298,4 +306,11 @@ function PushProcessor(client) {
|
|||||||
|
|
||||||
/** The PushProcessor class. */
|
/** The PushProcessor class. */
|
||||||
module.exports = PushProcessor;
|
module.exports = PushProcessor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See above
|
||||||
|
* @param {array} actionlist The actions list
|
||||||
|
*
|
||||||
|
* @return {object} See above
|
||||||
|
*/
|
||||||
module.exports.actionListToActionsObject = actionListToActionsObject;
|
module.exports.actionListToActionsObject = actionListToActionsObject;
|
||||||
|
|||||||
Reference in New Issue
Block a user