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
Send a DM to bot creator that informs them to add the bot to a team/channel #10683
Comments
I'll take this on! |
Thank you very much @Wipeout55! 👍 Let us know if you have any questions. |
Hey all, does anything need to happen when a bot is created through a plugin? It looks like the bot creator would usually be the plugin itself, but the code says it could also specify a user as the bot's owner. |
@Wipeout55 good question. If the bot is created through a plugin, let's not send a DM to the user. Only send it when a bot account is created through the REST API or through the UI via Main Menu > Integrations > Bot Accounts. This is because
|
Thanks @jasonblais! |
@jasonblais plugins can specify a user ID as owner ID when creating bots. This makes the specified user as the owner. Correct me if I'm wrong though. I think as long as |
@harshilsharma63 Thank you, I wasn't familiar with that. When someone creates a bot through the rest API or the UI, that person gets automatically assigned as the If so, your proposal about sending a DM to each user assigned as (/cc @Wipeout55) |
@jasonblais As far as I understand it, that is correct, which is why I raised the question in the first place. My apologies for not being clearer before. |
@Wipeout55 Ah okay, got it. I missed/forgot about that part. Then it makes sense to send a DM whenever a user is assigned as the |
Great, I'll make sure to include that change as well. Thanks again @jasonblais and also thanks to @harshilsharma63 for helping me clarify. A follow-up but somewhat unrelated question, who should I contact with regards to getting translations for the three(?) new strings I'll be adding to the app? |
Excellent question. You should make sure the user interface (UI) strings are included in |
Oh that's cool! I will make sure to do that! |
Great, thanks @Wipeout55! Here's also a quick 10-step checklist for contributions, which might be helpful https://developers.mattermost.com/contribute/getting-started/contribution-checklist/ (Not each step may apply to your PR of course :) ) |
Okay, so after lots of investigation I've come up with 2 ways of implementing this workflow. Both will involve creating a custom React component that will be rendered using the system_message_helper, but the amount of logic written on the front-end vs. the back-end will vary (and bear with me as I'm still new to the codebase :-) )
Upon speaking with @hmhealey, he recommended Option 2, but I wanted to throw this out to the community to see what everyone thought. A follow-up question: is there anything required for the mobile app? @hmhealey recommended that the message of the post inform the user that they would need to go to the web-app. |
@Wipeout55 I agree with Harrison here. 2 seems like the way to go. |
Thanks @crspeller for the feedback! In regards to the mobile app, if I am going to use Harrison's solution, what should the translation string be? |
That's a @jasonblais question! (But I think that's good.) |
@Wipeout55 That looks good, just a minor tweak:
and then also hide the I'm curious if the plan to direct them to the mobile app is due to technical limitations? |
The only technical limitation is that we need a fallback message like that for older versions of the mobile app and other clients like Matterhorn. I don't think we need to prioritize adding a proper mobile component for this though since you can't actually create bot users on mobile |
Okay I've pushed up my PR's. There's a small issue with the workflow: I have a few thoughts on how to remedy this:
Any feedback is appreciated, thanks everyone :) |
Great, thank you @Wipeout55! I think the second option (not having it persistent) seems okay from user experience perspective, but I'll tag @asaadmahmood to see if he has any thoughts |
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
Notes: Jira ticket
The purpose of this improvement is to make it more clear that bot accounts need to be added to teams and channels after creation.
It involves the following user flow:
Text:
Please select the **team** and **channel** you would like to add the bot to.
Dropdown: Contains a list of teams the user can choose from. This uses the existing message menu component.
:tada: I was successfully added to **{Channel Display Name}**.
The text was updated successfully, but these errors were encountered: