fix: fix org scoped access for resources

This commit is contained in:
Abhishek Kumar 2026-07-09 16:39:34 +05:30
parent f3bcf24370
commit e4b53f78e9
47 changed files with 2667 additions and 400 deletions

View file

@ -3,14 +3,20 @@ from typing import List
from pipecat.utils.enums import RealtimeFeedbackType
def _format_timestamp_range(payload: dict, event: dict, include_end_timestamps: bool) -> str:
def _format_timestamp_range(
payload: dict, event: dict, include_end_timestamps: bool
) -> str:
start_timestamp = payload.get("timestamp") or event.get("timestamp", "")
if not include_end_timestamps:
return start_timestamp
end_timestamp = payload.get("end_timestamp")
if end_timestamp:
return f"{start_timestamp} -> {end_timestamp}" if start_timestamp else end_timestamp
return (
f"{start_timestamp} -> {end_timestamp}"
if start_timestamp
else end_timestamp
)
return start_timestamp