diff options
author | Ajay <[email protected]> | 2022-02-06 14:04:54 -0500 |
---|---|---|
committer | Ajay <[email protected]> | 2022-02-06 14:04:54 -0500 |
commit | 32fa9c3398bf123958e69679614cf5fde73fbeaf (patch) | |
tree | bf86c163c1860ef2ef1b63deabd13ec05e40aac9 /src/messageTypes.ts | |
parent | 4a8e769596895b82ce01960d39f1fa88116c847b (diff) | |
download | SponsorBlock-32fa9c3398bf123958e69679614cf5fde73fbeaf.tar.gz SponsorBlock-32fa9c3398bf123958e69679614cf5fde73fbeaf.zip |
Hide segments when voting from the popup
Diffstat (limited to 'src/messageTypes.ts')
-rw-r--r-- | src/messageTypes.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/messageTypes.ts b/src/messageTypes.ts index 1b2949ea..8bee75f8 100644 --- a/src/messageTypes.ts +++ b/src/messageTypes.ts @@ -2,7 +2,7 @@ // Message and Response Types // -import { SponsorTime } from "./types"; +import { SegmentUUID, SponsorTime } from "./types"; interface BaseMessage { from?: string; @@ -29,7 +29,13 @@ interface IsInfoFoundMessage { updating: boolean; } -export type Message = BaseMessage & (DefaultMessage | BoolValueMessage | IsInfoFoundMessage); +interface submitVoteMessage { + message: "submitVote"; + type: number; + UUID: SegmentUUID; +} + +export type Message = BaseMessage & (DefaultMessage | BoolValueMessage | IsInfoFoundMessage | submitVoteMessage); export interface IsInfoFoundMessageResponse { found: boolean; @@ -59,7 +65,8 @@ export type MessageResponse = | GetChannelIDResponse | SponsorStartResponse | IsChannelWhitelistedResponse - | Record<string, never>; + | Record<string, never> + | VoteResponse; export interface VoteResponse { successType: number; |