Software / code / prosody
Comparison
plugins/mod_register_ibr.lua @ 10281:f90abf142d53
mod_register_ibr: Add FORM_TYPE as required by XEP-0077.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Sun, 29 Sep 2019 15:05:17 +0200 |
| parent | 9608:3e44b8dc2cc0 |
| child | 10286:23b26a414d71 |
comparison
equal
deleted
inserted
replaced
| 10280:6b8b255f1d10 | 10281:f90abf142d53 |
|---|---|
| 23 end); | 23 end); |
| 24 | 24 |
| 25 local account_details = module:open_store("account_details"); | 25 local account_details = module:open_store("account_details"); |
| 26 | 26 |
| 27 local field_map = { | 27 local field_map = { |
| 28 FORM_TYPE = { name = "FORM_TYPE", type = "hidden", value = "jabber:iq:register" }; | |
| 28 username = { name = "username", type = "text-single", label = "Username", required = true }; | 29 username = { name = "username", type = "text-single", label = "Username", required = true }; |
| 29 password = { name = "password", type = "text-private", label = "Password", required = true }; | 30 password = { name = "password", type = "text-private", label = "Password", required = true }; |
| 30 nick = { name = "nick", type = "text-single", label = "Nickname" }; | 31 nick = { name = "nick", type = "text-single", label = "Nickname" }; |
| 31 name = { name = "name", type = "text-single", label = "Full Name" }; | 32 name = { name = "name", type = "text-single", label = "Full Name" }; |
| 32 first = { name = "first", type = "text-single", label = "Given Name" }; | 33 first = { name = "first", type = "text-single", label = "Given Name" }; |
| 48 | 49 |
| 49 local registration_form = dataform_new{ | 50 local registration_form = dataform_new{ |
| 50 title = title; | 51 title = title; |
| 51 instructions = instructions; | 52 instructions = instructions; |
| 52 | 53 |
| 54 field_map.FORM_TYPE; | |
| 53 field_map.username; | 55 field_map.username; |
| 54 field_map.password; | 56 field_map.password; |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 local registration_query = st.stanza("query", {xmlns = "jabber:iq:register"}) | 59 local registration_query = st.stanza("query", {xmlns = "jabber:iq:register"}) |