Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MM-54328] CallStateData #16

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export type UserDismissedNotification = {
userID: string;
callID: string;
};
export type WebsocketEventData = EmptyData | HelloData | CallStartData | UserDisconnectedData | UserConnectedData | UserMutedUnmutedData | UserVoiceOnOffData | UserScreenOnOffData | UserRaiseUnraiseHandData | EmojiData | UserReactionData | CallHostChangedData | CallRecordingStateData | UserState | UserDismissedNotification;
export type WebsocketEventData = EmptyData | HelloData | CallStartData | UserDisconnectedData | UserConnectedData | UserMutedUnmutedData | UserVoiceOnOffData | UserScreenOnOffData | UserRaiseUnraiseHandData | EmojiData | UserReactionData | CallHostChangedData | CallRecordingStateData | UserState | UserDismissedNotification | CallStateData;
export interface Logger {
logDebug: (...args: unknown[]) => void;
logErr: (...args: unknown[]) => void;
Expand Down Expand Up @@ -113,6 +113,10 @@ export type CallState = {
[userID: string]: boolean;
};
};
export type CallStateData = {
channel_id: string;
call: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm crying inside. 😭

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funny we have two strongly typed languages both backend and frontend but have to resort to this 🤦‍♂️

};
export type CallChannelState = {
enabled: boolean;
channel_id: string;
Expand Down
8 changes: 7 additions & 1 deletion src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ export type WebsocketEventData =
| CallHostChangedData
| CallRecordingStateData
| UserState
| UserDismissedNotification;
| UserDismissedNotification
| CallStateData;

export interface Logger {
logDebug: (...args: unknown[]) => void;
Expand Down Expand Up @@ -156,6 +157,11 @@ export type CallState = {
dismissed_notification?: { [userID: string]: boolean };
}

export type CallStateData = {
channel_id: string;
call: string;
}

export type CallChannelState = {
enabled: boolean;
channel_id: string;
Expand Down