-
Notifications
You must be signed in to change notification settings - Fork 373
compose_box: Add start video call button in compose #1916
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
base: main
Are you sure you want to change the base?
Changes from all commits
0832ed4
6a478c4
bcb152d
6bafa8c
b34d6fb
db667ed
205a2d1
358f94f
6c43141
ebc180a
cf770f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ sealed class Event { | |
| case 'update': return UserSettingsUpdateEvent.fromJson(json); | ||
| default: return UnexpectedEvent.fromJson(json); | ||
| } | ||
| case 'has_zoom_token': return HasZoomTokenEvent.fromJson(json); | ||
| case 'custom_profile_fields': return CustomProfileFieldsEvent.fromJson(json); | ||
| case 'user_group': | ||
| switch (json['op'] as String) { | ||
|
|
@@ -1632,6 +1633,27 @@ enum ReactionOp { | |
| remove, | ||
| } | ||
|
|
||
| /// A Zulip event of type `hasZoomToken`: https://zulip.com/api/get-events#has_zoom_token | ||
| @JsonSerializable(fieldRename: FieldRename.snake) | ||
| class HasZoomTokenEvent extends Event { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commit-message nit: The event is named |
||
| @override | ||
| @JsonKey(includeToJson: true) | ||
| String get type => 'has_zoom_token'; | ||
|
|
||
| final bool value; | ||
|
|
||
| HasZoomTokenEvent({ | ||
| required super.id, | ||
| required this.value, | ||
| }); | ||
|
|
||
| factory HasZoomTokenEvent.fromJson(Map<String, dynamic> json) => | ||
| _$HasZoomTokenEventFromJson(json); | ||
|
|
||
| @override | ||
| Map<String, dynamic> toJson() => _$HasZoomTokenEventToJson(this); | ||
| } | ||
|
|
||
| /// A Zulip event of type `heartbeat`: https://zulip.com/api/get-events#heartbeat | ||
| @JsonSerializable(fieldRename: FieldRename.snake) | ||
| class HeartbeatEvent extends Event { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,6 +56,44 @@ class GroupSettingValueNameless extends GroupSettingValue { | |||||||||
| Map<String, dynamic> toJson() => _$GroupSettingValueNamelessToJson(this); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| /// As in [InitialSnapshot.realmAvailableVideoChatProviders]. | ||||||||||
| /// | ||||||||||
| /// For docs, search for "realm_available_video_chat_providers:" | ||||||||||
| /// in <https://zulip.com/api/register-queue>. | ||||||||||
| @JsonSerializable(fieldRename: FieldRename.snake) | ||||||||||
| class RealmAvailableVideoChatProviders { | ||||||||||
| final String name; | ||||||||||
| final int id; | ||||||||||
|
|
||||||||||
| RealmAvailableVideoChatProviders({ | ||||||||||
| required this.name, | ||||||||||
| required this.id, | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| factory RealmAvailableVideoChatProviders.fromJson(Map<String, dynamic> json) => | ||||||||||
| _$RealmAvailableVideoChatProvidersFromJson(json); | ||||||||||
|
|
||||||||||
| Map<String, dynamic> toJson() => _$RealmAvailableVideoChatProvidersToJson(this); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| @JsonSerializable(fieldRename: FieldRename.snake) | ||||||||||
| class VideoCallResponse { | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason to define this here, instead of in lib/api/route/video_call.dart, which I think would be our normal pattern? |
||||||||||
| final String msg; | ||||||||||
| final String result; | ||||||||||
| final String url; | ||||||||||
|
|
||||||||||
| VideoCallResponse({ | ||||||||||
| required this.msg, | ||||||||||
| required this.result, | ||||||||||
| required this.url, | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| factory VideoCallResponse.fromJson(Map<String, dynamic> json) => | ||||||||||
| _$VideoCallResponseFromJson(json); | ||||||||||
|
Comment on lines
+91
to
+92
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit:
Suggested change
|
||||||||||
|
|
||||||||||
| Map<String, dynamic> toJson() => _$VideoCallResponseToJson(this); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| /// As in [InitialSnapshot.customProfileFields]. | ||||||||||
| /// | ||||||||||
| /// For docs, search for "custom_profile_fields:" | ||||||||||
|
|
@@ -406,6 +444,28 @@ enum Emojiset { | |||||||||
| String toJson() => _$EmojisetEnumMap[this]!; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| /// As in [InitialSnapshot.realmVideoChatProvider]. | ||||||||||
| /// | ||||||||||
| /// For docs, search for "realm_video_chat_provider:" | ||||||||||
| /// in <https://zulip.com/api/register-queue>. | ||||||||||
| @JsonEnum(fieldRename: FieldRename.snake, valueField: "apiValue") | ||||||||||
| enum RealmVideoChatProvider { | ||||||||||
| none(apiValue: 0), | ||||||||||
| jitsiMeet(apiValue: 1), | ||||||||||
| zoomUserOAuth(apiValue: 3), | ||||||||||
| bigBlueButton(apiValue: 4), | ||||||||||
| zoomServerToServerOAuth(apiValue: 5), | ||||||||||
| unknown(apiValue: null); | ||||||||||
|
|
||||||||||
| const RealmVideoChatProvider({ | ||||||||||
| required this.apiValue, | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| final int? apiValue; | ||||||||||
|
|
||||||||||
| int? toJson() => apiValue; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| /// As in [InitialSnapshot.realmUserGroups] or [UserGroupAddEvent]. | ||||||||||
| @JsonSerializable(fieldRename: FieldRename.snake) | ||||||||||
| class UserGroup { | ||||||||||
|
|
||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message has incorrect grammar. It should read "Failed to get call URL" instead of "Fail to get call URL".