Skip to content
Snippets Groups Projects
Commit 2d23b938 authored by Alexander Cherniuk's avatar Alexander Cherniuk
Browse files

Minor reimplementation the /audio and /video commands

parent d9c7fca2
No related branches found
No related tags found
No related merge requests found
......@@ -198,22 +198,20 @@ class StandardCommonChatCommands(CommandContainer):
def audio(self):
if not self.audio_available:
raise CommandError(_("Audio sessions are not available"))
else:
# A state of an audio session is toggled by inverting a state of the
# appropriate button.
state = self._audio_button.get_active()
self._audio_button.set_active(not state)
# An audio session is toggled by inverting the state of the
# appropriate button.
state = self._audio_button.get_active()
self._audio_button.set_active(not state)
@command
@doc(_("Toggle video session"))
def video(self):
if not self.video_available:
raise CommandError(_("Video sessions are not available"))
else:
# A state of a video session is toggled by inverting a state of the
# appropriate button.
state = self._video_button.get_active()
self._video_button.set_active(not state)
# A video session is toggled by inverting the state of the
# appropriate button.
state = self._video_button.get_active()
self._video_button.set_active(not state)
class StandardChatCommands(CommandContainer):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment