kamiliff 0.10.6 → 0.11.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39e3cc6076cc67b0b5b4d1e5a8beb389843eeac5fc236d7308ebc9d0faa64188
4
- data.tar.gz: 6c5a4af401d5a784742ace551d1e45184617c60fd2cc1d7de568fbb9eba00afd
3
+ metadata.gz: 30dbfa0099981c67d4fd8cf24a65cd18483e137019f0697aa4ec04b674ddfc95
4
+ data.tar.gz: 739be33cf941f916e194e8817cb6c88e6cef3ed6cda75cab19c0f2c5834fee0b
5
5
  SHA512:
6
- metadata.gz: 01ca735e388bdcd0dd7e9cbd6972e0d46395773a4769db771992a3bb496774e70cbb6662b8e21bd276bca7fd097fd377512c08a490194d5705873d9d4ab73d21
7
- data.tar.gz: 448e308e0650e08a6a06d5b467feb0d58b5ef93d9879de0f0954bc22e90276549256b7499f580a84515b5b3b77bc4ae08951a49d772339224d61b336b3cb7025
6
+ metadata.gz: 683b694df114357159a457e806f68cde3548aa2aa184eaae57aa12d022bf5f2e0a99ed14625a4f6b670eb160b078526ef201b046479ffa23926c8b48c622f04f
7
+ data.tar.gz: 1faf343dec18c5febd4d22bc86746e9e4e7c08f8b52affd60ffc3255ccd0311a2d7175ed591a497ec787e1c7dba58131f22a8bf7fe98266e363fb0789278a81c
@@ -10,7 +10,7 @@ class LiffController < ApplicationController
10
10
 
11
11
  def route
12
12
  path = params["path"]
13
- @body = reserve_route(path, format: :liff)
13
+ @body = reserve_route(path, request_params: source_info, format: :liff)
14
14
  end
15
15
 
16
16
  private
@@ -29,4 +29,20 @@ class LiffController < ApplicationController
29
29
  rescue
30
30
  res[2].to_s
31
31
  end
32
+
33
+ def source_info
34
+ context = params["context"]
35
+ return nil if context.nil?
36
+
37
+ source_type = context["type"].gsub("utou", "user")
38
+ source_group_id = context["roomId"] || context["groupId"] || context["userId"]
39
+ source_user_id = context["userId"]
40
+
41
+ {
42
+ platform_type: 'line',
43
+ source_type: source_type,
44
+ source_group_id: source_group_id,
45
+ source_user_id: source_user_id,
46
+ }
47
+ end
32
48
  end
@@ -1,3 +1,3 @@
1
1
  module Kamiliff
2
- VERSION = '0.10.6'
2
+ VERSION = '0.11.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamiliff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - etrex kuo