Skip to content
Snippets Groups Projects
Verified Commit f794f716 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Skip user/room assignment if unnecessary in bot

parent 0840d37f
No related branches found
No related tags found
No related merge requests found
Pipeline #7850 passed
......@@ -42,11 +42,11 @@ class MatrixBot
end
def on_message(message)
return unless message.content[:body] == '!ping'
room = client.ensure_room message.room_id
sender = client.get_user message.sender
return unless message.content[:body] == '!ping'
puts "[#{Time.now.strftime '%H:%M'}] <#{sender.id} in #{room.id}> #{message.content[:body]}"
origin_ts = Time.at(message[:origin_server_ts] / 1000.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment