comparison frontends/src/quick_frontend/quick_chat.py @ 2048:aff318d4a786

quick frontend (chat): fixed getWidgetHash
author Goffi <goffi@goffi.org>
date Sun, 28 Aug 2016 18:23:55 +0200
parents f607349a01a4
children 1dc3c7680ea0
comparison
equal deleted inserted replaced
2047:7f5e344938c1 2048:aff318d4a786
223 def __str__(self): 223 def __str__(self):
224 return u"Chat Widget [target: {}, type: {}, profile: {}]".format(self.target, self.type, self.profile) 224 return u"Chat Widget [target: {}, type: {}, profile: {}]".format(self.target, self.type, self.profile)
225 225
226 @staticmethod 226 @staticmethod
227 def getWidgetHash(target, profiles): 227 def getWidgetHash(target, profiles):
228 profile = profiles[0] 228 profile = list(profiles)[0]
229 return (profile, target.bare) 229 return (profile, target.bare)
230 230
231 @staticmethod 231 @staticmethod
232 def getPrivateHash(target, profile): 232 def getPrivateHash(target, profile):
233 """Get unique hash for private conversations 233 """Get unique hash for private conversations