From 4eb49b9119e051c4fa01f3deca5fd51779f5573b Mon Sep 17 00:00:00 2001 From: Kacper Ziubryniewicz Date: Fri, 31 Aug 2018 13:25:37 +0200 Subject: [PATCH] Backwards compability for `Room`s --- fbchat/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fbchat/models.py b/fbchat/models.py index 51e8019..fa37447 100644 --- a/fbchat/models.py +++ b/fbchat/models.py @@ -131,6 +131,17 @@ class Group(Thread): self.approval_requests = approval_requests self.join_link = join_link + +class Room(Group): + # True is room is not discoverable + privacy_mode = None + + def __init__(self, uid, privacy_mode=None, **kwargs): + """Deprecated. Use :class:`Group` instead""" + super(Room, self).__init__(ThreadType.Room, uid, **kwargs) + self.privacy_mode = privacy_mode + + class Page(Thread): #: The page's custom url url = None @@ -518,6 +529,7 @@ class ThreadType(Enum): """Used to specify what type of Facebook thread is being used. See :ref:`intro_threads` for more info""" USER = 1 GROUP = 2 + ROOM = 2 PAGE = 3 class ThreadLocation(Enum):