import { fork as o, takeLatest as r, call as e } from "redux-saga/effects"
import { channel as m, buffers as i } from "redux-saga"
import { FEATURES as a, isFeatureSupported as d } from "@holepunchto/keet-core/features"
import { chatSaga as t, chatMembersBlockedHandler as s, chatFilePendingSaga as f } from "../../chat"
import { memberSaga as l, memberAllSubscriptionSaga as p } from "../../member"
import { taskErrorSaga as n } from "../../error"
import { memberListSaga as y } from "../../member-list"
import { updateRoomCapabilitiesInfo as g } from "../room-capabilities.saga"
import { subscribeRoomVersion as I } from "../room-version.saga"
import { subscribeToRoomInfo as b } from "../room-info.saga"
import { roomInfoSaga as c } from "./room-info.saga"
import { isBlockedMembersDataEvt as u } from "../../identity/member"
import { throttleFileStatsChanged as h } from "../../media/file/saga/file.saga"
import { forwardMessageToRoomSaga as S } from "../forward-message/forward-message.saga"
export function* dmRoomSaga({ roomId: V, myMemberId: x, appVersion: C, roomVersion: L }) {
try {
const n = yield e(m, i.expanding(20))
yield o(h, n)
const M = [],
w = d(L, a.CHAT_LABELS)
;(yield o(t, { roomId: V, filterNames: M, fileStatsChannel: n, useLabelsFeature: w }),
yield o(f, { roomId: V }),
yield o(g, { roomId: V, myMemberId: x }),
yield o(I, { roomId: V, appVersion: C }),
yield o(c, { roomId: V, fileStatsChannel: n }),
yield o(b, { roomId: V, appVersion: C }),
yield o(l, { roomId: V, myMemberId: x, disabledCapabilities: !0 }),
yield o(y, { roomId: V }),
yield o(p, { roomId: V }),
yield o(S, { appVersion: C }),
yield r(u, s))
} catch (o) {
yield n("dmRoomSaga", o)
}
}