refactor: change pref index order

This commit is contained in:
LuanRT
2021-10-22 17:37:18 -03:00
parent 14a5b0f0e8
commit c8e8f34a83

View File

@@ -49,7 +49,8 @@ async function notifications(session, action_type, args = {}) {
let data;
switch (action_type) {
case 'modify_channel_preference':
let pref_types = { ALL: 0, NONE: 1, PERSONALIZED: 2 };
let pref_types = { PERSONALIZED: 1, ALL: 2, NONE: 3 };
data = {
context: session.context,
params: Utils.encodeNotificationPref(args.channel_id, pref_types[args.pref.toUpperCase()])