Compare commits

...

6 Commits

Author SHA1 Message Date
lebaudantoine a3ab440ad3 wip add useUsernameParam to allow passing username through query params 2025-06-02 19:02:55 +02:00
lebaudantoine 69199a7ede wip allow skipping the pre join using skipPreJoin params 2025-06-02 19:02:15 +02:00
lebaudantoine f89bd8401c wip introduce shortcut to raise hand 2025-06-02 18:36:17 +02:00
lebaudantoine 7b61defe3c wip introduce shortcut to open chat 2025-06-02 18:34:22 +02:00
lebaudantoine 61aa3c79c5 🩹(backend) replace requests exception with urllib3 ones
My bad, I caught the wrong exception, issue is still raising in Sentry.
It fixes commit #2a7d963f
2025-05-28 10:49:03 +02:00
lebaudantoine 0c6cd8223d 🔖(minor) bump release to 0.1.23
Misc updates and fixes.
2025-05-27 21:50:21 +02:00
16 changed files with 58 additions and 17 deletions
+5 -2
View File
@@ -10,7 +10,7 @@ from django.core.exceptions import ImproperlyConfigured
from django.utils.module_loading import import_string
import brevo_python
import requests
import urllib3
logger = logging.getLogger(__name__)
@@ -121,7 +121,10 @@ class BrevoMarketingService:
try:
response = contact_api.create_contact(contact, **api_configurations)
except (brevo_python.rest.ApiException, requests.exceptions.ReadTimeout) as err:
except (
brevo_python.rest.ApiException,
urllib3.exceptions.ReadTimeoutError,
) as err:
logger.warning("Failed to create contact in Brevo", exc_info=True)
raise ContactCreationError("Failed to create contact in Brevo") from err
@@ -11,7 +11,7 @@ from django.core.exceptions import ImproperlyConfigured
import brevo_python
import pytest
import requests
import urllib3
from core.services.marketing import (
BrevoMarketingService,
@@ -152,7 +152,11 @@ def test_create_contact_timeout_error(mock_contact_api):
brevo_service = BrevoMarketingService()
mock_api.create_contact.side_effect = requests.exceptions.ReadTimeout()
mock_api.create_contact.side_effect = urllib3.exceptions.ReadTimeoutError(
pool=mock.Mock(),
url="https://api.brevo.com/v3/endpoint",
message="HTTPSConnectionPool(host='api.brevo.com', port=443): Read timed out.",
)
with pytest.raises(ContactCreationError, match="Failed to create contact in Brevo"):
brevo_service.create_contact(valid_contact_data)
+1 -1
View File
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "meet"
version = "0.1.22"
version = "0.1.23"
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "meet",
"version": "0.1.22",
"version": "0.1.23",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "meet",
"version": "0.1.22",
"version": "0.1.23",
"dependencies": {
"@livekit/components-react": "2.8.1",
"@livekit/components-styles": "1.1.5",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "meet",
"private": true,
"version": "0.1.22",
"version": "0.1.23",
"type": "module",
"scripts": {
"dev": "panda codegen && vite",
@@ -17,6 +17,7 @@ import posthog from 'posthog-js'
import { css } from '@/styled-system/css'
import { LocalUserChoices } from '../routes/Room'
import { BackgroundProcessorFactory } from '../livekit/components/blur'
import { useUsernameParam } from '@/features/rooms/hooks/useUsernameParam.ts'
export const Conference = ({
roomId,
@@ -29,6 +30,8 @@ export const Conference = ({
mode?: 'join' | 'create'
initialRoomData?: ApiRoom
}) => {
const username = useUsernameParam()
useEffect(() => {
posthog.capture('visit-room', { slug: roomId })
}, [roomId])
@@ -56,7 +59,7 @@ export const Conference = ({
queryFn: () =>
fetchRoom({
roomId: roomId as string,
username: userConfig.username,
username: username != null ? username : userConfig.username,
}).catch((error) => {
if (error.statusCode == '404') {
createRoom({ slug: roomId, username: userConfig.username })
@@ -0,0 +1,7 @@
import { useSearch } from 'wouter'
export const useSkipPreJoinParam = () => {
const search = useSearch()
const params = new URLSearchParams(search)
return params.get('skipPreJoin') === 'True'
}
@@ -0,0 +1,7 @@
import { useSearch } from 'wouter'
export const useUsernameParam = () => {
const search = useSearch()
const params = new URLSearchParams(search)
return params.get('username')
}
@@ -6,6 +6,7 @@ import { ToggleButton } from '@/primitives'
import { chatStore } from '@/stores/chat'
import { useSidePanel } from '../../hooks/useSidePanel'
import { ToggleButtonProps } from '@/primitives/ToggleButton'
import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'
export const ChatToggle = ({
onPress,
@@ -18,6 +19,12 @@ export const ChatToggle = ({
const { isChatOpen, toggleChat } = useSidePanel()
const tooltipLabel = isChatOpen ? 'open' : 'closed'
const shortcut = {
key: 'c',
ctrlKey: true,
}
useRegisterKeyboardShortcut({ shortcut, handler: toggleChat })
return (
<div
className={css({
@@ -9,6 +9,7 @@ import {
closeLowerHandToasts,
showLowerHandToast,
} from '@/features/notifications/utils'
import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'
const SPEAKING_DETECTION_DELAY = 3000
@@ -24,6 +25,12 @@ export const HandToggle = () => {
const speakingTimerRef = useRef<NodeJS.Timeout | null>(null)
const [hasShownToast, setHasShownToast] = useState(false)
const shortcut = {
key: 'h',
ctrlKey: true,
}
useRegisterKeyboardShortcut({ shortcut, handler: toggleRaisedHand })
const resetToastState = () => {
setHasShownToast(false)
}
@@ -14,6 +14,7 @@ import {
isRoomValid,
normalizeRoomId,
} from '@/features/rooms/utils/isRoomValid'
import { useSkipPreJoinParam } from '@/features/rooms/hooks/useSkipPreJoinParam.ts'
export type LocalUserChoices = LocalUserChoicesLK & {
processorSerialized?: ProcessorSerialized
@@ -28,7 +29,9 @@ export const Room = () => {
const [location, setLocation] = useLocation()
const initialRoomData = history.state?.initialRoomData
const mode = isLoggedIn && history.state?.create ? 'create' : 'join'
const skipJoinScreen = isLoggedIn && mode === 'create'
const skipPreJoin = useSkipPreJoinParam()
const skipJoinScreen = (isLoggedIn && mode === 'create') || skipPreJoin
useKeyboardShortcuts()
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "mail_mjml",
"version": "0.1.22",
"version": "0.1.23",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mail_mjml",
"version": "0.1.22",
"version": "0.1.23",
"license": "MIT",
"dependencies": {
"@html-to/text-cli": "0.5.4",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mail_mjml",
"version": "0.1.22",
"version": "0.1.23",
"description": "An util to generate html and text django's templates from mjml templates",
"type": "module",
"dependencies": {
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "sdk",
"version": "0.1.22",
"version": "0.1.23",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sdk",
"version": "0.1.22",
"version": "0.1.23",
"license": "ISC",
"workspaces": [
"./library",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sdk",
"version": "0.1.22",
"version": "0.1.23",
"author": "",
"license": "ISC",
"description": "",
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "summary"
version = "0.1.22"
version = "0.1.23"
dependencies = [
"fastapi[standard]>=0.105.0",
"uvicorn>=0.24.0",