-
Notifications
You must be signed in to change notification settings - Fork 227
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 logout
Command
#414
Conversation
- Added logout command to clear user credentials.
- Handle logout command in private chat - Add functionality to clear user credentials - Update help message in the chat history clearing section
🔒 feat: add logout function for user logout functionality
WalkthroughThe changes primarily introduce a logout functionality across different messaging platforms (Discord, Kook, Slack, Telegram) within the application. This involves adding new commands to clear user credentials, enhancing user authentication and security. Various files were updated to incorporate the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant DiscordBot
participant KookBot
participant SlackBot
participant TelegramBot
participant AuthService
User ->> DiscordBot: /logout
DiscordBot ->> AuthService: clear credentials
AuthService -->> DiscordBot: success
DiscordBot -->> User: Logout success
User ->> KookBot: /logout
KookBot ->> AuthService: clear credentials
AuthService -->> KookBot: success
KookBot -->> User: Logout success
User ->> SlackBot: /logout
SlackBot ->> AuthService: clear credentials
AuthService -->> SlackBot: success
SlackBot -->> User: Logout success
User ->> TelegramBot: /logout
TelegramBot ->> AuthService: clear credentials
AuthService -->> TelegramBot: success
TelegramBot -->> User: Logout success
This sequence diagram illustrates the interaction between the user and the different bots (Discord, Kook, Slack, Telegram) when the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- app/sender/discord/init.py (2 hunks)
- app/sender/discord/event.py (1 hunks)
- app/sender/kook/init.py (2 hunks)
- app/sender/kook/event.py (1 hunks)
- app/sender/slack/init.py (2 hunks)
- app/sender/slack/event.py (1 hunks)
- app/sender/telegram/init.py (4 hunks)
- app/sender/telegram/event.py (1 hunks)
- app/sender/util_func.py (1 hunks)
Additional comments not posted (11)
app/sender/telegram/event.py (1)
24-24
: The addition of the/logout
command is correctly implemented and aligns with the PR's objectives to enhance user authentication functionality.app/sender/discord/event.py (1)
19-20
: The renaming of/login
toset credential
and the addition of the/logout
command are correctly implemented and align with the PR's objectives to enhance user authentication functionality.app/sender/kook/event.py (1)
38-39
: The renaming of/login
toset credential
and the addition of the/logout
command are correctly implemented and align with the PR's objectives to enhance user authentication functionality.app/sender/slack/event.py (1)
27-27
: The addition of the/logout
command is correctly implemented and aligns with the PR's objectives to enhance user authentication functionality.app/sender/util_func.py (1)
223-233
: The implementation of thelogout
function is correctly done and aligns with the PR's objectives to enhance user authentication functionality by clearing user credentials.app/sender/slack/__init__.py (1)
252-261
: The implementation of thelisten_logout_command
function is correctly done and aligns with the PR's objectives to enhance user authentication functionality by handling the/logout
command.app/sender/kook/__init__.py (2)
37-37
: The addition of thelogout
function to the import list is appropriate for enabling its use within this module.
335-342
: The implementation of thelisten_logout_command
is correct and follows the async pattern expected for command handlers in this context. It properly uses thelogout
function and handles the message response appropriately.app/sender/telegram/__init__.py (2)
255-264
: The implementation of thelisten_logout_command
is correct and adheres to the async pattern. It properly parses the command, calls thelogout
function, and handles the message response correctly.
314-314
: The update to usetelegramify_markdown.convert
in thelisten_help_command
is a good improvement for consistent message formatting.app/sender/discord/__init__.py (1)
323-334
: The implementation of thelisten_logout_command
in the Discord module is correct. It uses thelogout
function appropriately and responds to the user correctly.
/logout
- clear credential