Untested Phase 1 (Foundation & Resource management) of voice chat integration
This commit is contained in:
@@ -47,6 +47,17 @@ class ProfilePictureManager:
|
||||
|
||||
def __init__(self):
|
||||
self._ensure_directories()
|
||||
self.switching_locked = False # Lock for voice session
|
||||
|
||||
def lock_switching(self):
|
||||
"""Lock profile picture changes during voice session"""
|
||||
self.switching_locked = True
|
||||
logger.info("Profile picture switching locked")
|
||||
|
||||
def unlock_switching(self):
|
||||
"""Unlock profile picture changes after voice session"""
|
||||
self.switching_locked = False
|
||||
logger.info("Profile picture switching unlocked")
|
||||
|
||||
def _ensure_directories(self):
|
||||
"""Ensure profile picture directory exists"""
|
||||
@@ -247,6 +258,16 @@ class ProfilePictureManager:
|
||||
Returns:
|
||||
Dict with status and metadata
|
||||
"""
|
||||
# Check if switching is locked (voice session active)
|
||||
if self.switching_locked:
|
||||
logger.info("Profile picture change blocked (voice session active)")
|
||||
return {
|
||||
"success": False,
|
||||
"source": None,
|
||||
"error": "Profile picture switching locked during voice session",
|
||||
"metadata": {}
|
||||
}
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"source": None,
|
||||
|
||||
Reference in New Issue
Block a user