rocketchat 0.1.23 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rocket_chat/gem_version.rb +1 -1
- data/lib/rocket_chat/messages/im.rb +3 -3
- data/lib/rocket_chat/request_helper.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23d1c8a93431402bbb37c5c6ec923e77c05aa3aeccab7a0e0cd598c14cabd495
|
4
|
+
data.tar.gz: b4c605b263d57257cc3285449988ee7bec9272fb24af6ef70c1a759810c65562
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2516550605f1ef594a60c13604400f863c36fe7da3f0fd06167c415cd3428f6181d8ff615835c57e3fb41282ac3b8e46b6abcd5a01436bd04068a6bff3566261
|
7
|
+
data.tar.gz: a897b18924cbd3631e2d071badeb0bfb91ea09e9ef7c2e4a6b17b8f322d45200ddea061026edaad6581d0e4343d0c9a961458160551d29f816937b536b6f5d8c
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
## Unreleased
|
4
4
|
- None
|
5
5
|
|
6
|
+
## [0.2.1](releases/tag/v0.2.1) - 2022-12-19
|
7
|
+
### Fixed
|
8
|
+
- [#41] URL-encode param values in GET query strings ([@nmagedman][])
|
9
|
+
|
6
10
|
## [0.1.23](releases/tag/v0.1.23) - 2022-11-11
|
7
11
|
### Added
|
8
12
|
- [#40] Add set_attr options for announcement, custom_fields and default for channels/groups ([@reist][],[@nmagedman][])
|
@@ -78,16 +78,16 @@ module RocketChat
|
|
78
78
|
#
|
79
79
|
# im.counters REST API
|
80
80
|
# @param [String] room_id Rocket.Chat roomId
|
81
|
-
# @param [String]
|
81
|
+
# @param [String] user_id Rocket.Chat userId [optional]
|
82
82
|
# @return [RocketChat::ImSummary]
|
83
83
|
# @raise [HTTPError, StatusError]
|
84
84
|
#
|
85
|
-
def counters(room_id:,
|
85
|
+
def counters(room_id:, user_id: nil)
|
86
86
|
response = session.request_json(
|
87
87
|
'/api/v1/im.counters',
|
88
88
|
body: {
|
89
89
|
roomId: room_id,
|
90
|
-
|
90
|
+
userId: user_id
|
91
91
|
}
|
92
92
|
)
|
93
93
|
RocketChat::ImSummary.new response
|
@@ -104,14 +104,14 @@ module RocketChat
|
|
104
104
|
|
105
105
|
def create_request(path, options)
|
106
106
|
headers = get_headers(options)
|
107
|
-
body = options[:body]
|
107
|
+
body = options[:body]&.reject { |_key, value| value.nil? }
|
108
108
|
|
109
109
|
if options[:method] == :post
|
110
110
|
req = Net::HTTP::Post.new(path, headers)
|
111
111
|
add_body(req, body) if body
|
112
112
|
else
|
113
113
|
uri = path
|
114
|
-
uri += "?#{
|
114
|
+
uri += "?#{URI.encode_www_form(body)}" if body
|
115
115
|
req = Net::HTTP::Get.new(uri, headers)
|
116
116
|
end
|
117
117
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocketchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- int512
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|