comparison sat.tac @ 30:d6b613764dd7

new plugin for xep 0077 (In-Band registration): first draft - wix: register in gateways manager now call the in-band registration process
author Goffi <goffi@goffi.org>
date Tue, 08 Dec 2009 04:19:41 +0100
parents 53e921c8a357
children b9bb5d8e0cc7
comparison
equal deleted inserted replaced
29:df3b0b5ac49e 30:d6b613764dd7
227 answer_type = "SUCCESS" 227 answer_type = "SUCCESS"
228 answer_data={"message":"Registration successfull"} 228 answer_data={"message":"Registration successfull"}
229 self.host.bridge.actionResult(answer_type, self.answer_id, answer_data) 229 self.host.bridge.actionResult(answer_type, self.answer_id, answer_data)
230 self.xmlstream.sendFooter() 230 self.xmlstream.sendFooter()
231 231
232 def registrationFailure(self, error): 232 def registrationFailure(self, failure):
233 info ("Registration failure: %s" % str(error.value)) 233 info ("Registration failure: %s" % str(failure.value))
234 answer_type = "ERROR" 234 answer_type = "ERROR"
235 answer_data = {} 235 answer_data = {}
236 if error.value.condition == 'conflict': 236 if failure.value.condition == 'conflict':
237 answer_data['reason'] = 'conflict' 237 answer_data['reason'] = 'conflict'
238 answer_data={"message":"Username already exists, please choose an other one"} 238 answer_data={"message":"Username already exists, please choose an other one"}
239 else: 239 else:
240 answer_data['reason'] = 'unknown' 240 answer_data['reason'] = 'unknown'
241 answer_data={"message":"Registration failed"} 241 answer_data={"message":"Registration failed"}