From 044feb0e1fdd5ba43b41cc73cf8ff7a042ef6507 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 6 Jun 2007 21:40:56 +0000
Subject: [PATCH] Do not use xmpppy DataForm class

---
 src/common/xmpp/features_nb.py | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/common/xmpp/features_nb.py b/src/common/xmpp/features_nb.py
index 5785a30345..1bad8e29ac 100644
--- a/src/common/xmpp/features_nb.py
+++ b/src/common/xmpp/features_nb.py
@@ -128,16 +128,13 @@ def _ReceivedRegInfo(con, resp, agent):
 		return
 	df=tag.getTag('x',namespace=NS_DATA)
 	if df:
-		con.Event(NS_REGISTER,REGISTER_DATA_RECEIVED,(agent,DataForm(node=df),True,''))
+		con.Event(NS_REGISTER,REGISTER_DATA_RECEIVED,(agent,df,True,''))
 		return
-	df=DataForm(typ='form')
+	df={}
 	for i in resp.getQueryPayload():
 		if not isinstance(i, Node):
-			pass
-		elif i.getName()=='instructions':
-			df.addInstructions(i.getData())
-		else:
-			df.setField(i.getName()).setValue(i.getData())
+			continue
+		df[i.getName()] = i.getData()
 	con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent,df,False,''))
 
 def register(disp, host, info, cb):
-- 
GitLab