lita-hipchat 2.1.0 → 2.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: 518a294fc9b098810837c5ae37baedf74b41dd1d
4
- data.tar.gz: 839c1911a104d0192263ac8ca50d7bdd57a1b812
3
+ metadata.gz: 9c7f6bd52728f09dc4baf260b1ea0ead6baf1b36
4
+ data.tar.gz: 958d81d4a11aa21d455bbbc3ae8d91ff7fd5607c
5
5
  SHA512:
6
- metadata.gz: 0124b4e76b0e2e11019b03acd41271a2c5e043b69e1217eb547807ebfef0e505cff46f0080adf31702bb71a08b4b20c138bcf70fd59aa3e2bf58344da7e6564c
7
- data.tar.gz: 03c37f96b4b3c029906f2a9543cf1962efd4ecbe8fd10562c66bdfc9b4dfe470e387394e6a64004f61e87aa758b1f3e922443ba5d45583c182d801489cadf521
6
+ metadata.gz: 05ece0c9f643fd09bdd0d22e7597ad1176501f15d189538a028e6d497b80f183e9705292b262316861c21b911657c8298de34f21cca9806251fd9d134fc07ed8
7
+ data.tar.gz: 8a487c201a060fbc0ac8e728762af373aa23faeb6385aa4634097c6a45e142d052de3c3fbef2a6645d8ea152c224de18f4a2de10ba37525d6aa2e5a1cbf9076a
@@ -63,7 +63,7 @@ module Lita
63
63
  def message_jid(user_jid, strings)
64
64
  strings.each do |s|
65
65
  Lita.logger.debug("Sending message to JID #{user_jid}: #{s}")
66
- message = Jabber::Message.new(user_jid, s)
66
+ message = Jabber::Message.new(user_jid, encode_string(s))
67
67
  message.type = :chat
68
68
  client.send(message)
69
69
  end
@@ -73,7 +73,7 @@ module Lita
73
73
  muc = mucs[room_jid]
74
74
  strings.each do |s|
75
75
  Lita.logger.debug("Sending message to MUC #{room_jid}: #{s}")
76
- muc.say(s)
76
+ muc.say(encode_string(s))
77
77
  end if muc
78
78
  end
79
79
 
@@ -140,6 +140,10 @@ module Lita
140
140
  end
141
141
  jid
142
142
  end
143
+
144
+ def encode_string(s)
145
+ s.encode('UTF-8', :invalid => :replace, :undef => :replace)
146
+ end
143
147
  end
144
148
  end
145
149
  end
data/lita-hipchat.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-hipchat"
3
- spec.version = "2.1.0"
3
+ spec.version = "2.1.1"
4
4
  spec.authors = ["Jimmy Cuadra"]
5
5
  spec.email = ["jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{A HipChat adapter for Lita.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Cuadra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2014-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -160,3 +160,4 @@ test_files:
160
160
  - spec/lita/adapters/hipchat/connector_spec.rb
161
161
  - spec/lita/adapters/hipchat_spec.rb
162
162
  - spec/spec_helper.rb
163
+ has_rdoc: