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

2.13.0 #303

Merged
merged 9 commits into from
Dec 4, 2017
Merged

2.13.0 #303

merged 9 commits into from
Dec 4, 2017

Conversation

benhanzl
Copy link
Contributor

Fixes #272 #273 #277 #278.

Proposed Changes

I have merged a few of the outstanding pull requests and propose creating the 2.13.0 release with them. I focused on the pull requests that did NOT introduce new features or were improvements that in my opinion needed some further discussion.

This release:

{
  "user": {
    "id": "123456",
    "jid": "[email protected]",
    "name": "Ben Hanzl",
    "mention_name": "BenHanzl",
    "email_address": "[email protected]",
    "room": "[email protected]"
  },
  "done": false,
  "room": "[email protected]",
  "text": "hello world"
}

Testing

I tested each of these code changes specifically on a production HipChat instance. I have also had this version deployed to our production instance for the past two weeks without issue.

Future

Once this is merged and published to npm, I will start the discussion with the other open pull requests to get them resolved.

Sam Day and others added 9 commits March 7, 2016 16:36
The Hubot Hipchat adapter uses the `envelope.user.reply_to` property as
the primary way for determining where a message should get sent. This
does not appear to be necessary. It is an abnormal pattern that doesn't
seem to be in any other popular adapters (Slack, Campfire). Perhaps this
was necessary on some older versions of Hubot and was never updated.

The `envelope.room` property seems to have all it needs to send the
message to the right place. Removing the `reply_to` logic simplifies
things quite a bit. This change also helps with hipchat#175 where messages
would get sent to the wrong origins for some long running processes if
the user happens to send a message in another room before the process
can finish.

The fix for the above problem in hipchat#207 broke the brain some. Typically,
in other adapters, the `message.user` object returned will be a
reference to the brain. Here, you can store data that you would want to
persist. By cloning this object it breaks that ability and can affect
plugins expecting that behavior.

Found this issue while working with the `hubot-pager-me` plugin. This
plugin assumes the `message.user` property is from the brain. When
doing things like `pager me as [email protected]` it assigns it to that
property where it should persist but does not. This does work in other
adapters though like Shell and Campfire.

Finally, one other added benefit these changes bring are a level of
consistency to the `user.room` property. When `changePresence()` was
called it would populate the brain and set the room to the JID version
which looks something like `[email protected]`. When a
message was getting handled it would filter the room through
`roomNameFromJid()` which would transform the room name to a friendlier
format like `foo_bar`. Now, the `user.room` property will always bet set
to the JID version.
@benhanzl
Copy link
Contributor Author

benhanzl commented Dec 4, 2017

@rbergman Let me know if there is anything I can do to assist with getting this merged.

@liorbrauer
Copy link

Great job @benhanzl on this PR! Only issue is that it seems to not be published on NPM yet 😢

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