Skip to content

Commit 093412c

Browse files
author
Jan Rochel
authored
Merge pull request #526 from pbriand/notifications
Ocsigen Start Notif Android
2 parents 1389f95 + 7ed853f commit 093412c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/os_fcm_notif.eliom

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ module Data =
137137

138138
let add_soundname str t = add_raw_string "soundname" str t
139139

140+
let add_notification_channel_id id t =
141+
("android_channel_id", `String id) :: t
142+
140143
let add_notification_id id t =
141144
("notId", `Int id) :: t
142145

src/os_fcm_notif.eliomi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ module Data :
177177
(** The type representing a data payload. *)
178178
type t
179179

180+
val to_json : t -> Yojson.Safe.json
181+
180182
(** [to_list data] returns the representation of the data as a list of
181183
tuples [(data_key, json_value)]. *)
182184
val to_list : t -> (string * Yojson.Safe.json) list
@@ -222,9 +224,11 @@ module Data :
222224
notification area instead of one. If a new notification has the same
223225
ID as an older one, the new one will replace it. It is useful for
224226
chats for example.
225-
*)
227+
*)
226228
val add_notification_id : int -> t -> t
227229

230+
val add_notification_channel_id : string -> t -> t
231+
228232
module Style :
229233
sig
230234
type t = Inbox | Picture

0 commit comments

Comments
 (0)