lib/tdlib/client_methods.rb
# Searches for messages in all chats except secret chats.
# Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)).
# For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified
#   limit.
#
# @param chat_list [TD::Types::ChatList] Chat list in which to search messages; pass null to search in all chats
#   regardless of their chat list.
#   Only Main and Archive chat lists are supported.
# @param query [TD::Types::String] Query to search for.
# @param offset_date [Integer] The date of the message starting from which the results need to be fetched.
#   Use 0 or any date in the future to get results from the last message.
# @param offset_chat_id [Integer] The chat identifier of the last found message, or 0 for the first request.
# @param offset_message_id [Integer] The message identifier of the last found message, or 0 for the first request.
# @param limit [Integer] The maximum number of messages to be returned; up to 100.
#   For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified
#   limit.
# @param filter [TD::Types::SearchMessagesFilter] Additional filter for messages to search; pass null to search for
#   all messages.
#   Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction,
#   searchMessagesFilterFailedToSend, and {TD::Types::SearchMessagesFilter::Pinned} are unsupported in this function.
# @param min_date [Integer] If not 0, the minimum date of the messages to return.
# @param max_date [Integer] If not 0, the maximum date of the messages to return.
# @return [TD::Types::Messages]
Searches for messages in all chats except secret chats.
Returns the results in reverse chronological order ).
For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified
limit.
Searches for messages in all chats except secret chats . Returns the results in reverse chronological order ) . For optimal performance the number of returned messages is chosen by TDLib and can be smaller than the specified limit .
def search_messages(chat_list:, query:, offset_date:, offset_chat_id:, offset_message_id:, limit:, filter:, min_date:,
                      max_date:)
    broadcast('@type'             => 'searchMessages',
              'chat_list'         => chat_list,
              'query'             => query,
              'offset_date'       => offset_date,
              'offset_chat_id'    => offset_chat_id,
              'offset_message_id' => offset_message_id,
              'limit'             => limit,
              'filter'            => filter,
              'min_date'          => min_date,
              'max_date'          => max_date)
  end
def search_messages ( chat_list : , query : , offset_date : , offset_chat_id : , offset_message_id : , limit : , filter : , min_date : , max_date : ) broadcast ( '@type' => 'searchMessages' , 'chat_list' => chat_list , 'query' => query , 'offset_date' => offset_date , 'offset_chat_id' => offset_chat_id , 'offset_message_id' => offset_message_id , 'limit' => limit , 'filter' => filter , 'min_date' => min_date , 'max_date' => max_date ) end
Searches for messages in all chats except secret chats.
Searches for messages in all chats except secret chats .
None
TD::Types::Messages
chat_list
Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported.
Chat list in which to search messages ; pass null to search in all chats regardless of their chat list . Only Main and Archive chat lists are supported .
query
Query to search for.
Query to search for .
offset_date
The date of the message starting from which the results need to be fetched. Use 0 or any date in the future to get results from the last message.
The date of the message starting from which the results need to be fetched . Use 0 or any date in the future to get results from the last message .
offset_chat_id
The chat identifier of the last found message, or 0 for the first request.
The chat identifier of the last found message or 0 for the first request .
offset_message_id
The message identifier of the last found message, or 0 for the first request.
The message identifier of the last found message or 0 for the first request .
limit
The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.
The maximum number of messages to be returned ; up to 100 . For optimal performance the number of returned messages is chosen by TDLib and can be smaller than the specified limit .
filter
Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterFailedToSend, and {TD::Types::SearchMessagesFilter::Pinned} are unsupported in this function.
Additional filter for messages to search ; pass null to search for all messages . Filters searchMessagesFilterMention searchMessagesFilterUnreadMention searchMessagesFilterUnreadReaction searchMessagesFilterFailedToSend and { TD :: Types :: SearchMessagesFilter :: Pinned } are unsupported in this function .
min_date
If not 0, the minimum date of the messages to return.
If not 0 the minimum date of the messages to return .
max_date
If not 0, the maximum date of the messages to return.
If not 0 the maximum date of the messages to return .