Skip to content

Commit

Permalink
chore(sdk): place Android notification channel under the android object
Browse files Browse the repository at this point in the history
  • Loading branch information
USA-RedDragon committed Oct 25, 2024
1 parent 38f7c14 commit 9edb752
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion plugins/diagnostics/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ class DiagnosticsPlugin extends ScryptedDeviceBase implements Settings {
await device.sendNotification('Scrypted Diagnostics', {
body: 'Body',
subtitle: 'Subtitle',
channel: 'diagnostics',
android: {
channel: 'diagnostics',
}
}, mo);

this.warnStep(console, 'Check the device for the notification.');
Expand Down
5 changes: 4 additions & 1 deletion sdk/types/scrypted_python/scrypted_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,16 @@ class MediaStreamOptions(TypedDict):
tool: MediaStreamTool # The tool was used to write the container or will be used to read teh container. Ie, scrypted, the ffmpeg tools, gstreamer.
video: VideoStreamOptions

class AndroidNotificationOptions(TypedDict):
channel: str

class NotifierOptions(TypedDict):

actions: list[NotificationAction]
android: AndroidNotificationOptions
badge: str
body: str
bodyWithSubtitle: str
channel: str
data: Any
dir: NotificationDirection
image: str
Expand Down
4 changes: 3 additions & 1 deletion sdk/types/src/types.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ export interface NotifierOptions {
badge?: string;
bodyWithSubtitle?: string;
body?: string;
channel?: string;
android?: {
channel?: string;
}
data?: any;
dir?: NotificationDirection;
lang?: string;
Expand Down

0 comments on commit 9edb752

Please sign in to comment.