addons/utils: Simple chat commands
This commit is contained in:
parent
1a422b65d0
commit
1a7b4bb970
1 changed files with 15 additions and 0 deletions
15
lib/addons/utils.rb
Normal file
15
lib/addons/utils.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Chronicle
|
||||
module Matrix
|
||||
# Ping - Pong. Useful for testing
|
||||
#
|
||||
# @param client [Client object] The current Matrix client connection
|
||||
# @param message [Message object] The relevant message object
|
||||
def handle_ping(client, message)
|
||||
room = client.ensure_room message.room_id
|
||||
|
||||
room.send_notice('Pong!')
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue