feat: Add presence heartbeat for Matrix online status

- matrix-gateway: POST /internal/matrix/presence/online endpoint
- usePresenceHeartbeat hook with activity tracking
- Auto away after 5 min inactivity
- Offline on page close/visibility change
- Integrated in MatrixChatRoom component
This commit is contained in:
Apple
2025-11-27 00:19:40 -08:00
parent 5bed515852
commit 3de3c8cb36
6371 changed files with 1317450 additions and 932 deletions

View File

@@ -1,26 +1,25 @@
FROM python:3.11-slim
# Встановити системні залежності
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Встановлюємо системні залежності
# qwen3_asr_toolkit може потребувати ffmpeg для обробки деяких форматів
RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Копіюємо requirements та встановлюємо залежності
# Копіювати requirements
COPY requirements.txt .
# Встановити Python залежності
RUN pip install --no-cache-dir -r requirements.txt
# Копіюємо код
COPY . .
# Копіювати код
COPY app/ ./app/
# Створюємо тимчасову директорію
RUN mkdir -p /tmp/stt
# Whisper модель завантажиться автоматично при першому запиті
# Це уникає проблем з мережею під час build
# Відкриваємо порт
EXPOSE 9000
# Запускаємо додаток
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9000"]
EXPOSE 8895
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8895"]