Mercurial > libervia-backend
comparison src/core/sat_main.py @ 909:fab49a1d5ea2
core: minor docstring fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 21 Mar 2014 15:03:51 +0100 |
parents | 308a96bc7c1b |
children | 1a3ba959f0ab |
comparison
equal
deleted
inserted
replaced
908:2ef523f0b5c3 | 909:fab49a1d5ea2 |
---|---|
539 treatments.addCallbacks(self.sendAndStoreMessage, sendErrback, [False, profile]) | 539 treatments.addCallbacks(self.sendAndStoreMessage, sendErrback, [False, profile]) |
540 treatments.callback(mess_data) | 540 treatments.callback(mess_data) |
541 return treatments | 541 return treatments |
542 | 542 |
543 def sendAndStoreMessage(self, mess_data, skip_send=False, profile=None): | 543 def sendAndStoreMessage(self, mess_data, skip_send=False, profile=None): |
544 """Actually send and store the message to history, after all the treatments | 544 """Actually send and store the message to history, after all the treatments have been done. |
545 have been done. This has been moved outside the main sendMessage method | 545 This has been moved outside the main sendMessage method because it is used by XEP-0033 to complete a server-side feature not yet |
546 because it is used by XEP-0033 to complete a server-side feature not yet | |
547 implemented by the prosody plugin. | 546 implemented by the prosody plugin. |
548 @param mess_data: message data dictionary | 547 @param mess_data: message data dictionary |
549 @param skip_send: set to True to skip sending the message to only store it | 548 @param skip_send: set to True to skip sending the message to only store it |
550 @param profile: profile | 549 @param profile: profile |
551 """ | 550 """ |
644 | 643 |
645 def requestServerDisco(self, feature, jid_=None, cache_only=False, profile_key="@NONE"): | 644 def requestServerDisco(self, feature, jid_=None, cache_only=False, profile_key="@NONE"): |
646 """Discover if a server or its items offer a given feature | 645 """Discover if a server or its items offer a given feature |
647 @param feature: the feature to check | 646 @param feature: the feature to check |
648 @param jid_: the jid of the server, local server if None | 647 @param jid_: the jid of the server, local server if None |
649 @param cache_only: expect the result to be in cache and don't actually | 648 @param cache_only: expect the result to be in cache and don't actually make any request. |
650 make any request. This can be used anytime for requesting a feature on | 649 This can be used anytime for requesting a feature on the local server because the data are cached for sure. |
651 the local server because the data are cached for sure. | |
652 @result: the Deferred entity jid offering the feature, or None | 650 @result: the Deferred entity jid offering the feature, or None |
651 | |
653 """ | 652 """ |
654 profile = self.memory.getProfileName(profile_key) | 653 profile = self.memory.getProfileName(profile_key) |
655 | 654 |
656 if not profile: | 655 if not profile: |
657 return defer.succeed(None) | 656 return defer.succeed(None) |