25 lines
600 B
OCaml
25 lines
600 B
OCaml
|
|
type client_id = | MqClient | HttpClient
|
|
|
|
module MatrixRoom = struct
|
|
type t = string
|
|
let make str = str
|
|
end
|
|
|
|
type forgejo_issue_data = { (* from an issue in forgejo get a reminder *)
|
|
url: string;
|
|
title: string;
|
|
due_date: string option;
|
|
body: string;
|
|
matrix_target: MatrixRoom.t
|
|
}
|
|
|
|
type Riot.Message.t +=
|
|
| RegisterClient of (client_id * Riot.Pid.t)
|
|
| LookupClient of client_id
|
|
| ListIssues
|
|
| Reminder of forgejo_issue_data
|
|
| InternalFailure of string
|
|
|
|
let forgejo_issues issues = issues |> List.map (fun r -> Reminder r)
|
|
let internal_failure reason = InternalFailure reason
|