Skip to content

Commit a917596

Browse files
committed
Merge branch 'master' of https://github.com/pyrogram/pyrogram
2 parents 9b28a12 + 6fb427f commit a917596

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

pyrogram/methods/chats/delete_user_history.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ async def delete_user_history(
4242
"""
4343

4444
r = await self.send(
45-
raw.functions.channels.DeleteUserHistory(
45+
raw.functions.channels.DeleteParticipantHistory(
4646
channel=await self.resolve_peer(chat_id),
47-
user_id=await self.resolve_peer(user_id)
47+
participant=await self.resolve_peer(user_id)
4848
)
4949
)
5050

pyrogram/methods/messages/send_chat_action.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class ChatAction:
3737
PLAYING = raw.types.SendMessageGamePlayAction
3838
CHOOSE_CONTACT = raw.types.SendMessageChooseContactAction
3939
SPEAKING = raw.types.SpeakingInGroupCallAction
40+
IMPORT_HISTORY = raw.types.SendMessageHistoryImportAction
41+
CHOOSE_STICKER = raw.types.SendMessageChooseStickerAction
4042
CANCEL = raw.types.SendMessageCancelAction
4143

4244

@@ -59,6 +61,7 @@ async def send_chat_action(self, chat_id: Union[int, str], action: str) -> bool:
5961
*"record_audio"* or *"upload_audio"* for audio files, *"upload_document"* for general files,
6062
*"find_location"* for location data, *"record_video_note"* or *"upload_video_note"* for video notes,
6163
*"choose_contact"* for contacts, *"playing"* for games, *"speaking"* for speaking in group calls or
64+
*"import_history"* for importing history, *"choose_sticker"* for stickers or
6265
*"cancel"* to cancel any chat action currently displayed.
6366
6467
Returns:
@@ -89,7 +92,7 @@ async def send_chat_action(self, chat_id: Union[int, str], action: str) -> bool:
8992
raise ValueError("Invalid chat action '{}'. Possible values are: {}".format(
9093
action, json.dumps(POSSIBLE_VALUES, indent=4))) from None
9194

92-
if "Upload" in action.__name__:
95+
if "Upload" in action.__name__ or "History" in action.__name__:
9396
action = action(progress=0)
9497
else:
9598
action = action()

0 commit comments

Comments
 (0)