1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-04 10:15:50 +03:00
* Update rubopcop [WIP]

* Further rubocop fixes

* Fix rubocop-rails cops

* Fix spec

* Disable rubocop suggestions

* Run rubocop in github actions rather than in codeclimate
Этот коммит содержится в:
Max Melentiev
2023-12-30 15:20:27 +00:00
коммит произвёл GitHub
родитель 7bcb0caded
Коммит 57b17f068c
82 изменённых файлов: 303 добавлений и 134 удалений

Просмотреть файл

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Telegram
module Bot
class UpdatesController
@@ -48,12 +50,12 @@ module Telegram
# it has higher priority than contextual action.
def action_for_message
val = message_context_session.delete(:context)
context = val && val.to_s
super || context && begin
args = payload['text'].try!(:split) || []
context = val&.to_s
super || (context && begin
args = payload['text']&.split || []
action = action_for_message_context(context)
[[action, type: :message_context, context: context], args]
end
[[action, {type: :message_context, context: context}], args]
end)
end
# Save context for the next request.