Move fetch_message_info to Message

This commit is contained in:
Mads Marquart
2020-01-09 00:34:48 +01:00
parent 4dea10d5de
commit 53e4669fc1
2 changed files with 10 additions and 16 deletions

View File

@@ -623,22 +623,6 @@ class Client:
raise FBchatException("Could not fetch image URL from: {}".format(j))
return url
def fetch_message_info(self, mid, thread_id=None):
"""Fetch `Message` object from the given message id.
Args:
mid: Message ID to fetch from
thread_id: User/Group ID to get message info from. See :ref:`intro_threads`
Returns:
Message: `Message` object
Raises:
FBchatException: If request failed
"""
message_info = self._forced_fetch(thread_id, mid).get("message")
return Message._from_graphql(message_info)
def fetch_poll_options(self, poll_id):
"""Fetch list of `PollOption` objects from the poll id.