mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 13:19:05 +00:00
Add webhook events storage to meetings model
- Add events column as JSON type to meetings table with default empty array - Add events: List[Dict[str, Any]] field to Meeting model - Create migration 2890b5104577 for events column and apply successfully - Add MeetingController helper methods for event storage: - add_event() for generic event storage with timestamps - participant_joined(), participant_left() for participant tracking - recording_started(), recording_stopped() for recording events - get_events() for event retrieval - Update Jitsi webhook endpoints to store events: - Store participant join/leave events with data and timestamps - Store recording start/stop events from Prosody webhooks - Store recording completion events from Jibri finalize script - Events stored with type, timestamp, and data for webhook history tracking - Fix linting and formatting issues Addresses PR feedback point 12: save webhook events in meetings events field
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"""Add events column to meetings table
|
||||
|
||||
Revision ID: 2890b5104577
|
||||
Revises: 6e6ea8e607c5
|
||||
Create Date: 2025-09-02 17:51:41.620777
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "2890b5104577"
|
||||
down_revision: Union[str, None] = "6e6ea8e607c5"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column(
|
||||
"events", sa.JSON(), server_default=sa.text("'[]'"), nullable=False
|
||||
)
|
||||
)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
||||
batch_op.drop_column("events")
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user