Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Add method for users.conversations #169

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions slacker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ def identity(self):
def set_active(self):
return self.post('users.setActive')

def conversations(self, user, types=('public_channel',)):
if isinstance(types, (list, tuple)):
types = ','.join(types)
return self.get('users.conversations', params={'user': user, 'types': types})

def get_presence(self, user):
return self.get('users.getPresence', params={'user': user})

Expand Down