diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2016-07-26 16:57:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-26 16:57:53 +0100 |
commit | 2452611d0f0163e7b9c531b48fce11a6dc7e1537 (patch) | |
tree | d2067b5f2fbfcc69f7303c3fa567082a5d9469b6 /synapse/handlers/profile.py | |
parent | Fix typo (diff) | |
parent | Add `create_requester` function (diff) | |
download | synapse-2452611d0f0163e7b9c531b48fce11a6dc7e1537.tar.xz |
Merge pull request #953 from matrix-org/rav/requester
Add `create_requester` function
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r-- | synapse/handlers/profile.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index 711a6a567f..d9ac09078d 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -13,15 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging + from twisted.internet import defer +import synapse.types from synapse.api.errors import SynapseError, AuthError, CodeMessageException -from synapse.types import UserID, Requester - +from synapse.types import UserID from ._base import BaseHandler -import logging - logger = logging.getLogger(__name__) @@ -165,7 +165,9 @@ class ProfileHandler(BaseHandler): try: # Assume the user isn't a guest because we don't let guests set # profile or avatar data. - requester = Requester(user, "", False) + # XXX why are we recreating `requester` here for each room? + # what was wrong with the `requester` we were passed? + requester = synapse.types.create_requester(user) yield handler.update_membership( requester, user, |