addons/utils: Simple chat commands

This commit is contained in:
Bill Niblock 2021-02-06 22:23:51 -05:00
parent 1a422b65d0
commit 1a7b4bb970

15
lib/addons/utils.rb Normal file
View 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