-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support deleting sessions #48
base: master
Are you sure you want to change the base?
Conversation
@aarani please review |
src/TgSharp.Core/FileSessionStore.cs
Outdated
string sessionFileName = $"{session.SessionUserId}.dat"; | ||
var sessionPath = basePath == null ? sessionFileName : | ||
Path.Combine (basePath.FullName, sessionFileName); | ||
File.Delete(sessionFileName); |
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.
check if the file exists first.
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.
Ok, I'll commit another
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.
@aarani Should I throw Exception when not exists?
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.
no, just ignore the command if it doesn't
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.
@aarani Is it good now?
Looks good, we will merge it after PR41 is merged. |
Add
Delete
method to session.This method is useful when logging out.