-
Notifications
You must be signed in to change notification settings - Fork 41
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
[GH-24] Implement channel welcome messages #31
[GH-24] Implement channel welcome messages #31
Conversation
27e32d5
to
26c1d97
Compare
@vespian Thanks for your work on this!
Looks good, thanks again! |
Done, see commit |
131cb65
to
3e33d03
Compare
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.
Nice work 👍 I leaved a few comment on the code style. The rest looks good.
@vespian Would you be interesting on also updating the documentation in |
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.
Looking really good! I have some additional comments and suggestions should help implement some DRY code :) Please request a new review after you've made a round of changes! Thanks for the PR!
@hanzei I am going to cherry-pick the documentation I wrote for other commands[1] and add docs for this PR on top of it. If this PR gets merged first, GH should auto-close the original PR, if not - I will simply rebase. [1] #30 |
4c6f77f
to
5db6350
Compare
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.
@vespian! Thanks for super prompt changes! I have a very small nit and then I'm approving :)
4f4cf36
to
6e15dad
Compare
@jfrerich Done, ready for another pass. |
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.
See #31 (comment)
@vespian do you mind resolving the conflicts please, apologies for taking awhile to QA/merge. |
Thanks @vespian for this enhancement!
I have a couple questions on this...
|
@vespian thanks for the work on this! Are you able to resolve the issue above and make the post show the bots username and profile image or, would his require a separate PR. |
@DHaussermann I was about to write a comment. Currently, I am: I will be happy to do one more pass and fix/look into issues c), d), e). If we decide on a), I will also take care of reverting my earlier changes as well and make the code follow the consensus. I am short on time so I am afraid that if there is going to be more changes above that, somebody from MM will have to take over or we can simply close the PR right now. |
@vespian Thanks for the hard work. Here's the order of items, in order of importance, to get this merged. If you are short on time, I've got no problem merging without all the fixes and I'll make the changes soon after! At a minimum, if you could fix 1 and 2, that would be enough to merge. It would be great to see the others, but I'll leave that for you to decide. Thanks again for the hard work!
|
@aaronrothschild, @DHaussermann, if there is an actionable item in for this, can you file an issue in the GitHub repo? |
8e7b6ec
to
c6e6f60
Compare
d941432
to
d8914a9
Compare
Done
Done
Done
Done
Once we fixed/reverted using |
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.
LGTM
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.
LGTM, this is great @vespian
Fantastic work, @vespian! Thanks for the latest round of commits. 🚀 |
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.
Tested and passed.
- Issue with bot ID and profile when settings are changes is resolved.
- Welcome bot posts are now ephemeral so they are visible by other users 🎉
- Brief round of regression testing.
LGTM!
Thanks @vespian this last round of improvements is great!
Summary
This is a rough draft of the channel welcome message as requested in #24
Three new commands were added (all of them relate to the channel in which they were executed):
set_channel_welcome
- sets the given text as channel welcome messageget_channel_welcome
- gets the channel welcome messagedelete_channel_welcome
- deletes the channel welcome messageThe sample workflow looks like this:
Channel welcome as seen by the user joining the channel:
Channel welcome as seen by other users in the channel:
For some reason sending ephemeral messages does not work, the mattermost-plugin-demo seems to be using plain Post messages as well [1].
I would love to hear feedback, whether this is something you had in mind. Personally I am thinking about:
a) mlog fields are not used properly throughout the plugin,
Sprintf
should not be usedb) the command handling function is growing into God-mode function, we should consider rewriting it, taking [2] as example
c) should we be concerned about the load of the KV store? Should we cache data locally?
I am thinking about making a) and b) a separate issue and addressing it once this PR and #30 lands. I would appreciate some feedback and information regarding c).
Thanks in advance!
[1] https://github.com/mattermost/mattermost-plugin-demo/blob/c29a9050a7cd0b1f40b761d256f1dfb6dd9fcc0a/server/channel_hooks.go#L54
[2] https://github.com/mattermost/mattermost-plugin-demo/blob/master/server/command_hooks.go
Ticket Link
Fixes #24