summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad/client/_secrets/util.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-02-25 09:11:44 -0300
committerdrebs <drebs@leap.se>2017-02-25 09:11:57 -0300
commit425bfe42ca3758cfa4cda4589ebb42530313850b (patch)
treefcc997975d04333debf81f086ec1be2f57720219 /client/src/leap/soledad/client/_secrets/util.py
parentb433c1ed736f5d4c19da4cdb21108a02459ca7fd (diff)
[doc] improve doc and rename EmitMixin to UserDataMixin
Diffstat (limited to 'client/src/leap/soledad/client/_secrets/util.py')
-rw-r--r--client/src/leap/soledad/client/_secrets/util.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/_secrets/util.py b/client/src/leap/soledad/client/_secrets/util.py
index 75418518..6401889b 100644
--- a/client/src/leap/soledad/client/_secrets/util.py
+++ b/client/src/leap/soledad/client/_secrets/util.py
@@ -23,12 +23,20 @@ class SecretsError(Exception):
pass
-class EmitMixin(object):
+class UserDataMixin(object):
+ """
+ When emitting an event, we have to pass a dictionary containing user data.
+ This class only defines a property so we don't have to define it in
+ multiple places.
+ """
@property
def _user_data(self):
uuid = self._soledad.uuid
userid = self._soledad.userid
+ # TODO: seems that uuid and userid hold the same value! We should check
+ # whether we should pass something different or if the events api
+ # really needs two different values.
return {'uuid': uuid, 'userid': userid}