core, frontends, bridgen plugins: fixed methods which were unproperly managing multi-profiles
- added profile argument to askConfirmation, actionResult, actionResultExt, entityDataUpdated, confirmationAnswer, getProgress
- core, frontends: fixed calls/signals according to new bridge API
- user of proper profile namespace for progression indicators and dialogs
- memory: getParam* now return bool when param type is bool
- memory: added getStringParam* to return string instead of typed value
- core, memory, storage, quick_frontend: getHistory now manage properly multi-profiles
- plugins XEP-0047, XEP-0054, XEP-0065, XEP-0077, XEP-0096; multi-profiles proper handling
This commit is contained in:
parent
49437fd9c3
commit
fa38394401
1 changed files with 570 additions and 400 deletions
|
|
@ -157,15 +157,15 @@ class XEP_0054():
|
|||
|
||||
if answer.firstChildElement().name == "vCard":
|
||||
d = self.vCard2Dict(answer.firstChildElement(), jid.JID(answer["from"]), profile)
|
||||
d.addCallback(lambda data: self.host.bridge.actionResult("RESULT", answer['id'], data))
|
||||
d.addCallback(lambda data: self.host.bridge.actionResult("RESULT", answer['id'], data, profile))
|
||||
else:
|
||||
error (_("FIXME: vCard not found as first child element"))
|
||||
self.host.bridge.actionResult("SUPPRESS", answer['id'], {}) #FIXME: maybe an error message would be better
|
||||
self.host.bridge.actionResult("SUPPRESS", answer['id'], {}, profile) #FIXME: maybe an error message would be better
|
||||
|
||||
def vcard_err(self, failure):
|
||||
def vcard_err(self, failure, profile):
|
||||
"""Called when something is wrong with registration"""
|
||||
error (_("Can't find VCard of %s") % failure.value.stanza['from'])
|
||||
self.host.bridge.actionResult("SUPPRESS", failure.value.stanza['id'], {}) #FIXME: maybe an error message would be better
|
||||
self.host.bridge.actionResult("SUPPRESS", failure.value.stanza['id'], {}, profile) #FIXME: maybe an error message would be better
|
||||
|
||||
def getCard(self, target, profile_key='@DEFAULT@'):
|
||||
"""Ask server for VCard
|
||||
|
|
@ -182,7 +182,7 @@ class XEP_0054():
|
|||
reg_request["from"]=current_jid.full()
|
||||
reg_request["to"] = to_jid.userhost()
|
||||
reg_request.addElement('vCard', NS_VCARD)
|
||||
reg_request.send(to_jid.userhost()).addCallbacks(self.vcard_ok, self.vcard_err, [profile])
|
||||
reg_request.send(to_jid.userhost()).addCallbacks(self.vcard_ok, self.vcard_err, callbackArgs=[profile], errbackArgs=[profile])
|
||||
return reg_request["id"]
|
||||
|
||||
def getAvatarFile(self, hash):
|
||||
|
|
|
|||
Loading…
Reference in a new issue