pusher-chatkit-server 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/chatkit/client.rb +8 -3
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 33bb47f7c771ac081b1066c99a5596f3eed28a415ef6f7efb73a9c2cac2f1553
4
- data.tar.gz: c7cf9d2ff97a64764ce3ae72ce959a14d8e2a91d6769e60b7d147f683f072219
2
+ SHA1:
3
+ metadata.gz: 45d32884903f70121e1abeb345ee47a4a5db9d0a
4
+ data.tar.gz: db5607de4f317a5d609290b7ed1e0b448c84523a
5
5
  SHA512:
6
- metadata.gz: f74588a794c695a0d5873619f0381708dc38469e4d3c7015782baa0d87838cc071fd4361a07afb32f241c01cbe5270a202320ef84dc99837debecdf30f2c3513
7
- data.tar.gz: a02fd622ce0d85d5072a4f7a48a20debfb2b447e749863dce895d09a105b9f6e7bafc4af79a3b270a18d8fd2509d3386cc1b305a0653c8ced98085ed024053c0
6
+ metadata.gz: 70b2403f843ce25c409d90645c7141a6b0b9e4f269dc89c509968143c38438b1e54bc754f73f890c8a6c809f2c385432cea02a0c2ec37202aad01831e359238b
7
+ data.tar.gz: c51cd9172aa01ea0e022b896d8f3631ba9242d2fedb4bf1a2c676bce836b59a39b52bd46bacd678273e5d86c0674edf973f4f6245bbdc39450cbdc79bb03df2f
@@ -42,7 +42,7 @@ module Chatkit
42
42
  @api_instance = PusherPlatform::Instance.new(
43
43
  base_options.merge({
44
44
  service_name: 'chatkit',
45
- service_version: 'v4'
45
+ service_version: 'v6'
46
46
  })
47
47
  )
48
48
 
@@ -238,6 +238,7 @@ module Chatkit
238
238
  private: options[:private] || false
239
239
  }
240
240
 
241
+ body[:id] = options[:id] unless options[:id].nil?
241
242
  body[:custom_data] = options[:custom_data] unless options[:custom_data].nil?
242
243
 
243
244
  unless options[:user_ids].nil?
@@ -499,13 +500,17 @@ module Chatkit
499
500
  end
500
501
 
501
502
  def delete_message(options)
502
- if options[:id].nil?
503
+ if options[:message_id].nil?
503
504
  raise Chatkit::MissingParameterError.new("You must provide the ID of the message you want to delete")
504
505
  end
505
506
 
507
+ if options[:room_id].nil?
508
+ raise Chatkit::MissingParameterError.new("You must provide the ID of the room to which the message belongs")
509
+ end
510
+
506
511
  api_request({
507
512
  method: "DELETE",
508
- path: "/messages/#{options[:id]}",
513
+ path: "/rooms/#{options[:room_id]}/messages/#{options[:message_id]}",
509
514
  jwt: generate_su_token[:token]
510
515
  })
511
516
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pusher-chatkit-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pusher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pusher-platform
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: '0'
57
57
  requirements: []
58
58
  rubyforge_project:
59
- rubygems_version: 2.7.6
59
+ rubygems_version: 2.6.12
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: Pusher Chatkit Ruby SDK