Skip to content

[Notifier] Add Chatwork Notifier Bridge #47373

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

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

Ippey
Copy link
Contributor

@Ippey Ippey commented Aug 24, 2022

Q A
Branch? 6.2
Bug fix? no
New feature? yes
Deprecations? no
License MIT

Add Chatwork Notifier Bridge.

Chatwork is one of the popular chat tools in Japan.
This bridge allows sending messages to Chatwork via Chatwork API.

try {
$statusCode = $response->getStatusCode();
} catch (TransportExceptionInterface $e) {
throw new TransportException('Could not reach the remote Discord server.', $response, 0, $e);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new TransportException('Could not reach the remote Discord server.', $response, 0, $e);
throw new TransportException('Could not reach the remote Chatwork server.', $response, 0, $e);

$originalContent = $message->getSubject();
$result = $response->toArray(false);
$errors = $result['errors'];
throw new TransportException(sprintf('Unable to post the Chatwork message: "%s" (%d: "%s").', $originalContent, $statusCode, implode(', ', $errors)), $response);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new TransportException(sprintf('Unable to post the Chatwork message: "%s" (%d: "%s").', $originalContent, $statusCode, implode(', ', $errors)), $response);
throw new TransportException(sprintf('Unable to post the Chatwork message: "%s" (%d: %s).', $originalContent, $statusCode, implode(', ', $errors)), $response);

If you received an error from fabbot here, that's a false positive.

@@ -0,0 +1,19 @@
Chatwork Notifier
===============
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
===============
=================

@Ippey
Copy link
Contributor Author

Ippey commented Aug 26, 2022

@fabpot Thank you, I applied those suggestions.

@fabpot
Copy link
Member

fabpot commented Aug 26, 2022

@Ippey Can you open a PR on symfony/recipes (like this one for instance).

@fabpot fabpot force-pushed the add-chatwork-notifier branch from 571eda6 to 6dcab51 Compare August 26, 2022 07:51
@fabpot
Copy link
Member

fabpot commented Aug 26, 2022

Thank you @Ippey.

@Ippey
Copy link
Contributor Author

Ippey commented Aug 26, 2022

@fabpot Created PR.

symfony/recipes#1121

@fabpot fabpot mentioned this pull request Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants