Skip to content

Conversation

@cjdelisle
Copy link
Contributor

@cjdelisle cjdelisle commented Jun 13, 2017

This PR does 3 things

  1. Change coffee to js. Hubot is changing to js aswell: CoffeeScript 🔜 JavaScript hubotio/hubot#1347 and it works still with older versions (but it is es6 so it does not work with nodejs 0.12 and 0.10)
  2. Pass the user's display name to the matrix client core, this makes bot replies reference your display name.
  3. Export the matrix client by setting robot.matrixClient = client so that plugins can do advanced things specific to matrix. For example create an unfederated room.
  4. Bump the version in package.json

src/matrix.js Outdated
let prettyname = room.currentState._userIdsToDisplayNames[name];
let user = this.robot.brain.userForId(name, { name: prettyname });
user.room = room.roomId;
if (user.name !== this.user_id) {
Copy link
Owner

Choose a reason for hiding this comment

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

Change user.name to user.id here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, I just updated this and also gave it name flexibility so it's displayname/botname can be different from it's matrix id

@davidar davidar merged commit d10e5a4 into davidar:master Jun 13, 2017
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.

2 participants