stream-chat-ruby 2.10.0 → 2.11.0
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/stream-chat/client.rb +15 -7
- data/lib/stream-chat/version.rb +1 -1
- 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: 99eb51b056c6265c10b7452897fef2ac5691def3e80819692c7755574b7e7672
|
4
|
+
data.tar.gz: 644d0384df490767e94588f1f76b0f0f0bd5012a1dfb9b2490c375e67dd6eacf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f172bdeebb0ddde0b55827be7f20ab72af074782ea2af5db7ad0bbda97f6d6abbc8b83e3098fdb34eb5b4312018320df42463a9a7ecc20afec370c8daefb0c0b
|
7
|
+
data.tar.gz: 70e907012a5fe56e57b5ec52a76a5ab24dfef914afe27e82eee6c47f22d701354ee2ba1bd057cb00da0dcc39f71d4a0edfcf70a60020aa3215f3aa6fa2907923
|
data/CHANGELOG.md
CHANGED
data/lib/stream-chat/client.rb
CHANGED
@@ -92,13 +92,21 @@ module StreamChat
|
|
92
92
|
get("messages/#{id}")
|
93
93
|
end
|
94
94
|
|
95
|
-
def search(filter_conditions, query, **options)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
95
|
+
def search(filter_conditions, query, sort: nil, **options)
|
96
|
+
offset = options[:offset]
|
97
|
+
next_value = options[:next]
|
98
|
+
raise ArgumentError, 'cannot use offset with next or sort parameters' if offset&.positive? && (next_value || (!sort.nil? && !sort.empty?))
|
99
|
+
|
100
|
+
to_merge = {
|
101
|
+
filter_conditions: filter_conditions,
|
102
|
+
sort: get_sort_fields(sort)
|
103
|
+
}
|
104
|
+
if query.is_a? String
|
105
|
+
to_merge[:query] = query
|
106
|
+
else
|
107
|
+
to_merge[:message_filter_conditions] = query
|
108
|
+
end
|
109
|
+
get('search', params: { payload: options.merge(to_merge).to_json })
|
102
110
|
end
|
103
111
|
|
104
112
|
def update_users(users)
|
data/lib/stream-chat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stream-chat-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mircea Cosbuc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|