Module: LiffHelper

Defined in:
app/helpers/liff_helper.rb

Instance Method Summary collapse

Instance Method Details

#liff_path(params) ⇒ Object



11
12
13
14
# File 'app/helpers/liff_helper.rb', line 11

def liff_path(params)
  liff = LiffService.new(params)
  liff.full_url
end

#old_liff_path(params) ⇒ Object



2
3
4
5
6
7
8
9
# File 'app/helpers/liff_helper.rb', line 2

def old_liff_path(params)
  liff = LiffService.new(params)
  if ENV["LIFF_MODE"]&.downcase == "replace"
    return "#{liff.url}/liff_entry?#{params.to_query}"
  end
  # liff mode is Concatenate
  "#{liff.url}?#{params.to_query}"
end