Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0054.py @ 639:99eee75ec1b7
core: better handling of profile_key and don't write the param file anymore
- new error ProfileNotSetError and some methods use the default @NONE@ instead of @DEFAULT@
- do not output the .sat/param file anymore, it is not needed and created confusion
- plugin XEP-0054: remove an error message at startup
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 05 Sep 2013 21:03:52 +0200 |
parents | 84a6e83157c2 |
children | 787ee59dba9c |
comparison
equal
deleted
inserted
replaced
638:6821fc06a324 | 639:99eee75ec1b7 |
---|---|
197 error(_("FIXME: vCard not found as first child element")) | 197 error(_("FIXME: vCard not found as first child element")) |
198 self.host.bridge.actionResult("SUPPRESS", answer['id'], {}, profile) # FIXME: maybe an error message would be better | 198 self.host.bridge.actionResult("SUPPRESS", answer['id'], {}, profile) # FIXME: maybe an error message would be better |
199 | 199 |
200 def vcard_err(self, failure, profile): | 200 def vcard_err(self, failure, profile): |
201 """Called when something is wrong with registration""" | 201 """Called when something is wrong with registration""" |
202 error(_("Can't find VCard of %s") % failure.value.stanza['from']) | 202 if failure.value.stanza.hasAttribute("from"): |
203 error(_("Can't find VCard of %s") % failure.value.stanza['from']) | |
203 self.host.bridge.actionResult("SUPPRESS", failure.value.stanza['id'], {}, profile) # FIXME: maybe an error message would be better | 204 self.host.bridge.actionResult("SUPPRESS", failure.value.stanza['id'], {}, profile) # FIXME: maybe an error message would be better |
204 | 205 |
205 def getCard(self, target_s, profile_key='@DEFAULT@'): | 206 def getCard(self, target_s, profile_key='@DEFAULT@'): |
206 """Ask server for VCard | 207 """Ask server for VCard |
207 @param target_s: jid from which we want the VCard | 208 @param target_s: jid from which we want the VCard |