From 116b39cf6aca0bd6d536b1244ea2e473f52ead80 Mon Sep 17 00:00:00 2001 From: ekohilas Date: Sun, 8 Oct 2017 03:07:34 +1100 Subject: [PATCH] fixed superclass init error --- fbchat/client.py | 2 +- fbchat/models.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fbchat/client.py b/fbchat/client.py index bc65baa..359f626 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -807,7 +807,7 @@ class Client(object): admins = set(p.lstrip('fbid:') for p in k['admin_ids']), approval_mode = k['approval_mode'], approval_requests = set(p.lstrip('fbid:') for p in k['approval_queue_ids']), - join_link = k['joinable_mode']['link'], + join_link = k['joinable_mode']['link'] )) else: raise FBchatException('A thread had an unknown thread type: {}'.format(k)) diff --git a/fbchat/models.py b/fbchat/models.py index d7024cb..efa05ce 100644 --- a/fbchat/models.py +++ b/fbchat/models.py @@ -123,7 +123,8 @@ class Room(Group): def __init__(self, uid, admins=None, approval_mode=None, approval_requests=None, join_link=None, privacy_mode=None, **kwargs): """Represents a Facebook room. Inherits `Group`""" - super(Room, self).__init__(ThreadType.ROOM, uid, **kwargs) + super(Room, self).__init__(uid, **kwargs) + self.type = ThreadType.ROOM if admins is None: admins = set() self.admins = admins