fix getting of url when filling contact

This commit is contained in:
Romain Bignon 2010-11-17 19:30:51 +01:00
commit 6a242eb30f
2 changed files with 4 additions and 3 deletions

View file

@ -330,7 +330,8 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
contact.name = profile.get_name()
contact.status = s
else:
contact = Contact(_id, profile.get_name(), s, self.browser.id2url(_id))
contact = Contact(_id, profile.get_name(), s)
contact.url = self.browser.id2url(_id)
contact.status_msg = profile.get_status()
contact.summary = profile.description
for photo in profile.photos:

View file

@ -59,11 +59,11 @@ class Contact(CapBaseObject):
STATUS_OFFLINE = 0x004
STATUS_ALL = 0xfff
def __init__(self, id, name, status, url):
def __init__(self, id, name, status):
CapBaseObject.__init__(self, id)
self.add_field('name', basestring, name)
self.add_field('status', int, status)
self.add_field('url', basestring, url)
self.add_field('url', basestring)
self.add_field('status_msg', basestring)
self.add_field('summary', basestring)
self.add_field('photos', dict, OrderedDict())