ellen-hipchat 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e93050d2c424827b21eae85f71b6159d1277e398
4
- data.tar.gz: ffd18a8711dcdc370adf2baaa991d86731dfcf6d
3
+ metadata.gz: 0a78919d1a484ddb18db359dce2f8ecaf5b3ba25
4
+ data.tar.gz: 9b57f29363f0d8241536a087fa298affd61f1fec
5
5
  SHA512:
6
- metadata.gz: b51939dc3d3693b15e2295b63a2782418583d8695976c0e813b7924ee458f8194a03db0c2d633f5944868428b97b50ff00b15ed0d72f439ebe3f36a8f19cd6ac
7
- data.tar.gz: 877a99c1c3026fe5dcdc2d6d99f3183c92d094f9cec9fcd8de57e84e29400269e2a9a0ad9873429fab3b3d2a4ac3cac71c7cea8145fd1396e0a5258eee238045
6
+ metadata.gz: 951af6f12bc2b85fd493d1806d1d1b945849cb55896f3a61f66e926df56df5d9b06c5aa7057f9c10320b9285c2cb3dc23a8132031ccdc678e506284406564a9c
7
+ data.tar.gz: 109790846d197350c61ba5436d5172cd091632dd866591e567c764bcb73ff9c3003cd174b2b7130f99a7cb52d7a42ccb43aa3fb223a959b129b2c96e8f58c0a4
@@ -1,3 +1,6 @@
1
+ ## 0.1.1
2
+ * Support Ellen::Message#from_name
3
+
1
4
  ## 0.1.0
2
5
  * Change XMPP library: xmpp4r -> xrc
3
6
 
@@ -74,10 +74,20 @@ module Ellen
74
74
  robot.receive(
75
75
  body: message.body,
76
76
  from: message.from,
77
+ from_name: username_of(message),
77
78
  to: message.to,
78
79
  type: message.type,
79
80
  )
80
81
  end
82
+
83
+ def username_of(message)
84
+ case message.type
85
+ when "groupchat"
86
+ Xrc::Jid.new(message.from).resource
87
+ else
88
+ client.users[message.from].name
89
+ end
90
+ end
81
91
  end
82
92
  end
83
93
  end
@@ -1,5 +1,5 @@
1
1
  module Ellen
2
2
  module Hipchat
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ellen-hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-15 00:00:00.000000000 Z
11
+ date: 2014-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ellen