Few fixes
This commit is contained in:
committed by
GitHub
parent
06da486140
commit
3b43d3f0bd
@@ -603,6 +603,7 @@ class Client(object):
|
|||||||
:rtype: list
|
:rtype: list
|
||||||
:raises: FBchatException if request failed
|
:raises: FBchatException if request failed
|
||||||
"""
|
"""
|
||||||
|
thread_id, thread_type = self._getThread(thread_id, None)
|
||||||
data = {
|
data = {
|
||||||
"query": query,
|
"query": query,
|
||||||
"snippetOffset": offset,
|
"snippetOffset": offset,
|
||||||
@@ -1275,14 +1276,14 @@ class Client(object):
|
|||||||
"""
|
"""
|
||||||
Changes group's approval mode
|
Changes group's approval mode
|
||||||
|
|
||||||
:param approval_mode: True or False
|
:param require_admin_approval: True or False
|
||||||
:param thread_id: Group ID to remove people from. See :ref:`intro_threads`
|
:param thread_id: Group ID to remove people from. See :ref:`intro_threads`
|
||||||
:raises: FBchatException if request failed
|
:raises: FBchatException if request failed
|
||||||
"""
|
"""
|
||||||
thread_id, thread_type = self._getThread(thread_id, None)
|
thread_id, thread_type = self._getThread(thread_id, None)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"set_mode": int(approval_mode),
|
"set_mode": int(require_admin_approval),
|
||||||
"thread_fbid": thread_id
|
"thread_fbid": thread_id
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1813,7 +1814,7 @@ class Client(object):
|
|||||||
else:
|
else:
|
||||||
data = dict()
|
data = dict()
|
||||||
for i, thread_id in enumerate(thread_ids):
|
for i, thread_id in enumerate(thread_ids):
|
||||||
data["{}[{}]".format(loc_str, i)] = thread_id
|
data["{}[{}]".format(location.name.lower(), i)] = thread_id
|
||||||
r = self._post(self.req_url.MOVE_THREAD, data)
|
r = self._post(self.req_url.MOVE_THREAD, data)
|
||||||
return r.ok
|
return r.ok
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user