mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-04-21 04:35:19 +00:00
feat: send email in share transcript and add email sending in room (#924)
* fix: add source language for file pipeline * feat: send email in share transcript and add email sending in room * fix: hide audio and video streaming for unauthenticated users * fix: security order
This commit is contained in:
committed by
GitHub
parent
74b9b97453
commit
e2ba502697
@@ -228,7 +228,11 @@ export function useRoomDelete() {
|
||||
});
|
||||
}
|
||||
|
||||
export function useZulipStreams() {
|
||||
export function useConfig() {
|
||||
return $api.useQuery("get", "/v1/config", {});
|
||||
}
|
||||
|
||||
export function useZulipStreams(enabled: boolean = true) {
|
||||
const { isAuthenticated } = useAuthReady();
|
||||
|
||||
return $api.useQuery(
|
||||
@@ -236,7 +240,7 @@ export function useZulipStreams() {
|
||||
"/v1/zulip/streams",
|
||||
{},
|
||||
{
|
||||
enabled: isAuthenticated,
|
||||
enabled: enabled && isAuthenticated,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -291,6 +295,16 @@ export function useTranscriptPostToZulip() {
|
||||
});
|
||||
}
|
||||
|
||||
export function useTranscriptSendEmail() {
|
||||
const { setError } = useError();
|
||||
|
||||
return $api.useMutation("post", "/v1/transcripts/{transcript_id}/email", {
|
||||
onError: (error) => {
|
||||
setError(error as Error, "There was an error sending the email");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function useTranscriptUploadAudio() {
|
||||
const { setError } = useError();
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
Reference in New Issue
Block a user