Skip to content

Commit

Permalink
Add support for muting notifications for a thread [#246] Added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Jul 8, 2021
1 parent ec00b40 commit 8b383ee
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/*.jpg
# emacs
*~
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
20 changes: 20 additions & 0 deletions docs/usage-guide/direct.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,30 @@
| direct_media_share(media_id: str, user_ids: List[int]) | DirectMessage | Share a media to list of users
| direct_thread_mark_unread(thread_id: int) | bool | Mark a thread as unread
| direct_message_delete(thread_id: int, message_id: int) | bool | Delete a message from thread
| direct_thread_mute(thread_id: int, revert: bool = False) | bool | Mute the thread
| direct_thread_unmute(thread_id: int) | bool | Unmute the thread
| direct_thread_mute_video_call(thread_id: int, revert: bool = False) | bool | Mute video call for the thread
| direct_thread_unmute_video_call(thread_id: int) | bool | Unmute video call for the thread

Example:

```
>>> from instagrapi import Client
>>> cl = Client()
>>> cl.login(USERNAME, PASSWORD)
>>> cl.direct_thread_mark_unread(340282366841710301949128122292511813703)
True
>>> cl.direct_thread_mute(340282366841710301949128122292511813703)
True
>>> cl.direct_thread_mute_video_call(340282366841710301949128122292511813703)
True
>>> cl.direct_thread_unmute_video_call(340282366841710301949128122292511813703)
True
>>> cl.direct_thread_unmute(340282366841710301949128122292511813703)
True
```

0 comments on commit 8b383ee

Please sign in to comment.