-
Notifications
You must be signed in to change notification settings - Fork 0
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(hangouts): Threading! #138
Conversation
a905eeb
to
9dd613b
Compare
Add support for threaded messages in Hangouts. This is useful when multiple messages are sent in quick succession from the same app, for example RepoCop. The additional field is optional, so should be backwards compatible.
9dd613b
to
2112057
Compare
@@ -46,7 +47,8 @@ case class Notification( | |||
actions: List[Action], | |||
target: List[Target], | |||
channel: RequestedChannel, | |||
sourceSystem: String | |||
sourceSystem: String, | |||
threadKey: Option[String] // only used for Hangouts messages |
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.
This Notification
case class is the contract between Anghammarad and users. Adding the additional field as an Option
should mean this change is backwards compatible.
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.
Minor: we could default this to None
?
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.
Ah yes! I hadn't set a default value so I could see all the compiler warnings. Can safely set one now though.
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.
Great work 👍
This has been released now in v1.8.1 of the Scala plugin, and v1.1.0 in the NPM module. EDIT: I've unpublished v1.1.0 from NPM, and released this change as v1.8.1 instead - https://www.npmjs.com/package/@guardian/anghammarad?activeTab=versions. We haven't followed semver here, but the version numbers align at least. |
What does this change?
Add support for threaded messages in Hangouts. This is useful when multiple messages are sent in quick succession from the same app, for example RepoCop. Threading messages together, hopefully, reduces the sense of spam/noise.
This change requires a new version of the libraries to be published. The additional field is optional, so should be backwards compatible for clients using older versions of the libraries.
How to test
Run the "dev" project locally and observe threaded messages: