comparison mod_invite/mod_invite.lua @ 2614:a6e97031972c

mod_invite: Remove unused arguments [luacheck]
author Kim Alvefur <zash@zash.se>
date Tue, 14 Mar 2017 04:19:26 +0100
parents 2103135f1851
children efb69a260723
comparison
equal deleted inserted replaced
2613:2103135f1851 2614:a6e97031972c
26 return k 26 return k
27 end 27 end
28 end) 28 end)
29 end 29 end
30 30
31 function generate_page(event, display_options) 31 function generate_page(event)
32 local request, response = event.request, event.response; 32 local request, response = event.request, event.response;
33 33
34 local tokens = invite_storage:get() or {}; 34 local tokens = invite_storage:get() or {};
35 35
36 local token = request.path:match("^/invite/([^/]*)$"); 36 local token = request.path:match("^/invite/([^/]*)$");
56 rostermanager.set_contact_pending_in(user1, module.host, user2_jid); 56 rostermanager.set_contact_pending_in(user1, module.host, user2_jid);
57 rostermanager.subscribed(user1, module.host, user2_jid); 57 rostermanager.subscribed(user1, module.host, user2_jid);
58 rostermanager.process_inbound_subscription_approval(user2, module.host, user1_jid); 58 rostermanager.process_inbound_subscription_approval(user2, module.host, user1_jid);
59 end 59 end
60 60
61 function handle_form(event, display_options) 61 function handle_form(event)
62 local request, response = event.request, event.response; 62 local request, response = event.request, event.response;
63 local form_data = http_formdecode(request.body); 63 local form_data = http_formdecode(request.body);
64 local user, password, token = form_data["user"], form_data["password"], form_data["token"]; 64 local user, password, token = form_data["user"], form_data["password"], form_data["token"];
65 local tokens = invite_storage:get() or {}; 65 local tokens = invite_storage:get() or {};
66 66
123 ["GET /*"] = generate_page; 123 ["GET /*"] = generate_page;
124 POST = handle_form; 124 POST = handle_form;
125 }; 125 };
126 }); 126 });
127 127
128 function invite_command_handler(self, data, state) 128 function invite_command_handler(_, data)
129 local uuid = uuid_new(); 129 local uuid = uuid_new();
130 130
131 local user, host = jid_split(data.from); 131 local user, host = jid_split(data.from);
132 132
133 if host ~= module.host then 133 if host ~= module.host then