-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ability to login with a Personal access token #52
Conversation
tgly307
commented
Jul 31, 2018
- Add ability to login with a Personal access token
- Remove useless attribute "info" of MattermostClient, its value is same with "user" and no place use it.
- The default value of "data" which in post function of MattermostAPI is removed, because the "data" field is not optional, and the type of json.dumps(None) is string, an error will be reported.
# Conflicts: # mmpy_bot/mattermost_v4.py
…attribute 'info' of MattermostClient. Modify data of post function in MattermostAPI from optional to required.
#51 done |
mmpy_bot/mattermost.py
Outdated
self.user = None | ||
self.info = None | ||
# self.info = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are getting rid of info, might as well delete these lines instead of commenting them out.
mmpy_bot/mattermost.py
Outdated
self.login(team, email, password) | ||
|
||
def login(self, team, email, password): | ||
self.email = email | ||
self.user = self.api.login(team, email, password) | ||
self.info = self.api.me() | ||
# self.info = self.api.me() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks fine
done |