Unsending messages
This commit is contained in:
@@ -1116,6 +1116,18 @@ class Client(object):
|
|||||||
data['specific_to_list[0]'] = "fbid:{}".format(thread_id)
|
data['specific_to_list[0]'] = "fbid:{}".format(thread_id)
|
||||||
return self._doSendRequest(data)
|
return self._doSendRequest(data)
|
||||||
|
|
||||||
|
def unsend(self, mid):
|
||||||
|
"""
|
||||||
|
Unsends a message (removes for everyone)
|
||||||
|
|
||||||
|
:param mid: :ref:`Message ID <intro_message_ids>` of the message to unsend
|
||||||
|
"""
|
||||||
|
data = {
|
||||||
|
'message_id': mid,
|
||||||
|
}
|
||||||
|
r = self._post(self.req_url.UNSEND, data)
|
||||||
|
r.raise_for_status()
|
||||||
|
|
||||||
def _sendLocation(self, location, current=True, thread_id=None, thread_type=None):
|
def _sendLocation(self, location, current=True, thread_id=None, thread_type=None):
|
||||||
thread_id, thread_type = self._getThread(thread_id, thread_type)
|
thread_id, thread_type = self._getThread(thread_id, thread_type)
|
||||||
data = self._getSendData(thread_id=thread_id, thread_type=thread_type)
|
data = self._getSendData(thread_id=thread_id, thread_type=thread_type)
|
||||||
|
@@ -141,6 +141,7 @@ class ReqUrl(object):
|
|||||||
GET_POLL_OPTIONS = "https://www.facebook.com/ajax/mercury/get_poll_options"
|
GET_POLL_OPTIONS = "https://www.facebook.com/ajax/mercury/get_poll_options"
|
||||||
SEARCH_MESSAGES = "https://www.facebook.com/ajax/mercury/search_snippets.php?dpr=1"
|
SEARCH_MESSAGES = "https://www.facebook.com/ajax/mercury/search_snippets.php?dpr=1"
|
||||||
MARK_SPAM = "https://www.facebook.com/ajax/mercury/mark_spam.php?dpr=1"
|
MARK_SPAM = "https://www.facebook.com/ajax/mercury/mark_spam.php?dpr=1"
|
||||||
|
UNSEND = "https://www.facebook.com/messaging/unsend_message/?dpr=1"
|
||||||
|
|
||||||
pull_channel = 0
|
pull_channel = 0
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user