Blasta/blasta/xmpp/form.py
Schimon Jehudah, Adv. 24dbadf7dc Fix various of errors, consequent to the restructuring of the code;
Add missing dependencies and files;
Thank you to LeXofLeviafan and roughnecks.
2024-11-17 14:00:31 +02:00

15 lines
435 B
Python

#!/usr/bin/python
# -*- coding: utf-8 -*-
class DataForm:
def create_setting_entry(xmpp_instance, key : str, value : str):
form = xmpp_instance['xep_0004'].make_form('form', 'Settings')
form['type'] = 'result'
form.add_field(var=key, value=value)
return form
# def create_setting_entry(value : str):
# element = ET.Element('value')
# element.text = value
# return element