2024-11-13 15:41:33 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2024-11-17 13:00:31 +01:00
|
|
|
class DataForm:
|
2024-11-13 15:41:33 +01:00
|
|
|
|
|
|
|
def create_setting_entry(xmpp_instance, key : str, value : str):
|
|
|
|
form = xmpp_instance['xep_0004'].make_form('form', 'Settings')
|
|
|
|
form['type'] = 'result'
|
2024-11-17 13:00:31 +01:00
|
|
|
form.add_field(var=key, value=value)
|
2024-11-13 15:41:33 +01:00
|
|
|
return form
|
|
|
|
|
|
|
|
# def create_setting_entry(value : str):
|
|
|
|
# element = ET.Element('value')
|
|
|
|
# element.text = value
|
|
|
|
# return element
|