Skip to content

Commit

Permalink
Add receipt module
Browse files Browse the repository at this point in the history
  • Loading branch information
erdnaxeli committed Dec 2, 2020
1 parent d07339c commit ec626f9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/modules/receipts.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module Caridina::Modules::Receipts
enum Type
Read

def to_s
case self
in Type::Read
"m.read"
end
end
end

def send_receipt(room_id : String, event_id : String, type = Type::Read) : Nil
post("/rooms/#{room_id}/receipt/#{type}/#{event_id}")
end
end

0 comments on commit ec626f9

Please sign in to comment.