Skip to content
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

fix: MM remote improvements #519

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JamesMConroy
Copy link
Contributor

@JamesMConroy JamesMConroy commented Oct 8, 2024

Proposed change

Update the MM remote so it supports

  • scheduled messages
  • output_to_rooms
  • output_to_users
  • direct messages

Types of changes

What types of changes is this pull request introducing to flottbot?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

You can fill this out after creating your PR. Put an x in the boxes that apply

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

James Conroy added 3 commits October 6, 2024 13:27
The scheduler would never trigger, because the MM remote never populated
the list of rooms the bot can talk in.

The bot should now support the output_rooms option in rules.
Helps simplify the code to call the function once instead of running
through all the steps to create a direct message every time.
@wass3r
Copy link
Collaborator

wass3r commented Oct 10, 2024

thanks for the PR, i'll review over the next few days!

@JamesMConroy
Copy link
Contributor Author

Thank you, Only thing is that I couldn't run the lint target. golangci-lint would freeze and use all my cpu.

@wass3r
Copy link
Collaborator

wass3r commented Oct 10, 2024

Oh, yikes. That's new. I'll see if I encounter that as well. Thanks for the heads up.

@coveralls
Copy link

coveralls commented Oct 11, 2024

Pull Request Test Coverage Report for Build 11300483375

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 10426782526: 0.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

@wass3rw3rk
Copy link
Member

the linter ran, if you want to fix up the issues from that. seems like mostly minor style issues. i will run some tests on mattermost in the meantime.

i did run golangci-lint locally (version 1.61.0). while it did take a bit of time, it did finish the checks.

thanks again for the contribution.

stuff like cuddled assignements, unnessisary new lines, and putting the
context argument first in function parameters
@JamesMConroy
Copy link
Contributor Author

i did run golangci-lint locally (version 1.61.0). while it did take a bit of time, it did finish the checks.

I must of annoyed the computer goblins or something.

Here's what it looks like using the example scheduler rule

image

Changes are pushed. I'll probably make another MR when I want to add reactions.

@JamesMConroy
Copy link
Contributor Author

oh the channels are specified with channel/room-name and the user name shouldn't have a leading @

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants