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

feat(service): add lark service #300

Merged
merged 7 commits into from
Aug 5, 2022
Merged

Conversation

immanuelhume
Copy link
Contributor

@immanuelhume immanuelhume commented Jun 5, 2022

Description

Adds a notifier service for Lark.

Motivation and Context

This addresses #268.

Lark has three kinds of bots, referred to as "webhook", "custom app", and "store app" bots. The first two are supported through this PR, which explains the two different files webhook.go and custom_app.go. The store apps have a tricky API which would work against the simple style of this library so they are not included here.

How Has This Been Tested?

Basic unit tests using mocks have been written. Manual testing has also been performed.

Screenshots / Output (if appropriate):

The first screenshot is with a webhook. The second is with a custom app.

photo_2022-06-05_23-38-53
photo_2022-06-05_23-39-51

Types of changes

  • Bug fix (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 change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Comment on lines +52 to +58
const (
openID receiverIDType = "open_id"
userID receiverIDType = "user_id"
unionID receiverIDType = "union_id"
email receiverIDType = "email"
chatID receiverIDType = "chat_id"
)
Copy link
Owner

@nikoksr nikoksr Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the receiverIDType to all constants due to this. Could you please verify that this does not break functionality and/or behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it again manually and still works fine!

@nikoksr
Copy link
Owner

nikoksr commented Aug 4, 2022

@immanuelhume so sorry for the very late response.

I fixed the compatibility issues with the main branch and some linter warnings. Please check those before you push next time, please.

I greatly appreciate your patience and contribution!

@immanuelhume
Copy link
Contributor Author

@nikoksr Sorry I must've missed those warnings. Thanks for maintaining this project!

@nikoksr nikoksr merged commit 2a4c078 into nikoksr:main Aug 5, 2022
@nikoksr nikoksr linked an issue Aug 5, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(service): Add lark service
2 participants