util.dataforms: Set form type when generating a form
authorMatthew Wild <mwild1@gmail.com>
Sun, 5 Apr 2009 18:41:24 +0000 (19:41 +0100)
committerMatthew Wild <mwild1@gmail.com>
Sun, 5 Apr 2009 18:41:24 +0000 (19:41 +0100)
util/dataforms.lua

index a57e183b007d0f776d5e9e20275cc10c11ed1c7e..58b45fd354dff0d54971ace5f609bde83bb5d35d 100644 (file)
@@ -16,10 +16,8 @@ function new(layout)
        return setmetatable(layout, form_mt);
 end
 
-local form_x_attr = { xmlns = xmlns_forms };
-
 function form_t.form(layout, data)
-       local form = st.stanza("x", form_x_attr);
+       local form = st.stanza("x", { xmlns = xmlns_forms, type = "form" });
        if layout.title then
                form:tag("title"):text(layout.title):up();
        end