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 +4 -4
- data/app/controllers/liff_controller.rb +17 -1
- data/lib/kamiliff/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30dbfa0099981c67d4fd8cf24a65cd18483e137019f0697aa4ec04b674ddfc95
|
|
4
|
+
data.tar.gz: 739be33cf941f916e194e8817cb6c88e6cef3ed6cda75cab19c0f2c5834fee0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/kamiliff/version.rb
CHANGED