← 返回 snapchat 的题目列表Fetch Latest Group Chat Messages
类型:online_judge
snapchat
Write a function to fetch the latest messages from a group chat. The input parameters are groupId and pageSize. You need to return the chat content of all members in the group, ordered from newest to oldest by time. The output format is List<Message>. There is an existing API that can return all messages sent by each member, but the messages are unsorted. Note that some users may have a very large number of messages, and the number of chat messages returned each time cannot exceed pageSize.
Example
Input
{'groupId': 1, 'pageSize': 5}