diff --git a/common/scripts/version.txt b/common/scripts/version.txt index 11e837dd691..43fd0616b8b 100644 --- a/common/scripts/version.txt +++ b/common/scripts/version.txt @@ -1 +1 @@ -"0.7.136" +"0.7.139" diff --git a/models/love/src/index.ts b/models/love/src/index.ts index 4dc7bb34a40..e4c3acf44a3 100644 --- a/models/love/src/index.ts +++ b/models/love/src/index.ts @@ -96,7 +96,10 @@ export class TRoom extends TDoc implements Room { @Index(IndexKind.FullText) description!: MarkupBlobRef | null - type!: RoomType + @Prop(TypeAny(love.component.RoomTypePresenter, love.string.Video), love.string.Video, { + editor: love.component.RoomTypePresenter + }) + type!: RoomType access!: RoomAccess diff --git a/models/love/src/migration.ts b/models/love/src/migration.ts index 3d2a634fddd..a940e58e0cb 100644 --- a/models/love/src/migration.ts +++ b/models/love/src/migration.ts @@ -174,6 +174,17 @@ export const loveOperation: MigrateOperation = { func: async (client) => { await client.reindex(DOMAIN_MEETING_MINUTES, [love.class.MeetingMinutes]) } + }, + { + state: 'default-office-video', + mode: 'upgrade', + func: async (client) => { + await client.update( + DOMAIN_LOVE, + { _class: love.class.Office, type: RoomType.Audio }, + { type: RoomType.Video } + ) + } } ]) }, diff --git a/plugins/love-resources/src/components/AddRoomPopup.svelte b/plugins/love-resources/src/components/AddRoomPopup.svelte index 719eacc0c3a..467bd716683 100644 --- a/plugins/love-resources/src/components/AddRoomPopup.svelte +++ b/plugins/love-resources/src/components/AddRoomPopup.svelte @@ -39,7 +39,7 @@ { id: 'office', label: love.string.Office, - type: RoomType.Audio, + type: RoomType.Video, _class: love.class.Office, access: RoomAccess.Knock } diff --git a/plugins/love-resources/src/components/EditRoom.svelte b/plugins/love-resources/src/components/EditRoom.svelte index 0dc79e3ce8e..e837d132c9a 100644 --- a/plugins/love-resources/src/components/EditRoom.svelte +++ b/plugins/love-resources/src/components/EditRoom.svelte @@ -13,8 +13,8 @@ // limitations under the License. --> + + diff --git a/plugins/love-resources/src/index.ts b/plugins/love-resources/src/index.ts index bd786a0b3a6..32f26eb2d18 100644 --- a/plugins/love-resources/src/index.ts +++ b/plugins/love-resources/src/index.ts @@ -28,6 +28,7 @@ import MediaPopupItemExt from './components/MediaPopupItemExt.svelte' import SharingStateIndicator from './components/SharingStateIndicator.svelte' import MeetingScheduleData from './components/MeetingScheduleData.svelte' import EditMeetingScheduleData from './components/EditMeetingScheduleData.svelte' +import RoomTypePresenter from './components/RoomTypePresenter.svelte' import { copyGuestLink, @@ -71,7 +72,8 @@ export default async (): Promise => ({ MediaPopupItemExt, SharingStateIndicator, MeetingScheduleData, - EditMeetingScheduleData + EditMeetingScheduleData, + RoomTypePresenter }, function: { CreateMeeting: createMeeting, diff --git a/plugins/love-resources/src/plugin.ts b/plugins/love-resources/src/plugin.ts index 49c8fbc5b4a..dc80a2560c9 100644 --- a/plugins/love-resources/src/plugin.ts +++ b/plugins/love-resources/src/plugin.ts @@ -36,7 +36,8 @@ export default mergeIds(loveId, love, { MeetingMinutesDocEditor: '' as AnyComponent, MeetingMinutesStatusPresenter: '' as AnyComponent, MeetingScheduleData: '' as AnyComponent, - EditMeetingScheduleData: '' as AnyComponent + EditMeetingScheduleData: '' as AnyComponent, + RoomTypePresenter: '' as AnyComponent }, function: { CreateMeeting: '' as Resource, diff --git a/plugins/love-resources/src/utils.ts b/plugins/love-resources/src/utils.ts index a8c5a3c6c02..56c33da88e0 100644 --- a/plugins/love-resources/src/utils.ts +++ b/plugins/love-resources/src/utils.ts @@ -767,7 +767,7 @@ async function connectLK (currentPerson: Person, room: Room): Promise { await connect(currentPerson.name, room, currentPerson._id) await Promise.all([ setMic($myPreferences?.micEnabled ?? lk.remoteParticipants.size < 16), - setCam(room.type === RoomType.Video && ($myPreferences?.camEnabled ?? true)) + setCam(room.type === RoomType.Video && !isOffice(room) && ($myPreferences?.camEnabled ?? true)) ]) } diff --git a/plugins/love/src/utils.ts b/plugins/love/src/utils.ts index 2d45c64ec02..fa07ab76449 100644 --- a/plugins/love/src/utils.ts +++ b/plugins/love/src/utils.ts @@ -23,7 +23,7 @@ export function createDefaultRooms (employees: Ref[]): (Data & { _id: Ref } = { _id, name: '', - type: RoomType.Audio, + type: RoomType.Video, access: RoomAccess.Knock, floor: love.ids.MainFloor, width: 2,