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 group message issues #244

Merged
merged 8 commits into from
Feb 24, 2021
Merged

Fix group message issues #244

merged 8 commits into from
Feb 24, 2021

Conversation

nonumpa
Copy link
Member

@nonumpa nonumpa commented Feb 22, 2021

Fix remain issues from PR #238

  1. documentation regarding the custom dimensions; and if we should use custom metric instead of custom dimension for user count in chat groups
  2. remove excessive comment
  3. simplify test case

Others

  1. Add leave command for room user to kick out chatbot
  2. Fix rollbar item 335 [LINE Client] 400: Only group id is acceptable (room/group use different api endpoint to get members count)

@nonumpa nonumpa requested a review from MrOrz February 22, 2021 10:33
@coveralls
Copy link

coveralls commented Feb 22, 2021

Pull Request Test Coverage Report for Build 1286

  • 13 of 13 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 86.776%

Totals Coverage Status
Change from base Build 1275: 0.07%
Covered Lines: 924
Relevant Lines: 1051

💛 - Coveralls

);

const visitor = ga(groupId, 'N/A', '', otherFields.source.type);

visitor.set('cm1', groupMembersCount);
Copy link
Member Author

Choose a reason for hiding this comment

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

Because chatbot may join/leave a group multiple times,
we should find the last Join action of the Client Id to get a more accurate Group Members Count.
Don't know if there's a better way to handle this condition.

Copy link
Member

Choose a reason for hiding this comment

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

Got it, thanks for the note!

@MrOrz MrOrz temporarily deployed to rumors-line-bot-staging February 24, 2021 05:36 Inactive
Copy link
Member

@MrOrz MrOrz left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Let's get it to dev & staging ASAP.

@@ -49,6 +51,11 @@ export default async function processText(event, groupId) {
return { event, groupId, replies };
}

if (event.input.toLowerCase() === LEAVE_KEYWORD) {
await lineClient.post(`/${event.source.type}/${groupId}/leave`);
Copy link
Member

Choose a reason for hiding this comment

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

Does this trigger leave webhook? If not, we may need to manually send ga here.

Copy link
Member Author

@nonumpa nonumpa Feb 24, 2021

Choose a reason for hiding this comment

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

Yes, it does.

@MrOrz MrOrz merged commit e4f306f into dev Feb 24, 2021
@MrOrz MrOrz deleted the fix/group-message branch February 24, 2021 06:18
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.

3 participants