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

Touchup for /dtmf implementation

parent 48b2bfd7
No related branches found
No related tags found
No related merge requests found
......@@ -173,13 +173,12 @@ class StandardChatCommands(CommandContainer):
gajim.connections[self.account].sendPing(self.contact)
@command
@documentation(_("Sends DTMF events through an open audio session"))
@documentation(_("Send DTMF events through an open audio session"))
def dtmf(self, events):
if not self.audio_sid:
raise CommandError(_("There is no open audio session with this contact"))
# Valid values for DTMF tones are *, # or a number
events = [event for event in events
if event in ('*', '#') or event.isdigit()]
events = filter(lambda e: e in ('*', '#') or e.isdigit (), events)
if events:
session = gajim.connections[self.account].get_jingle_session(
self.contact.get_full_jid(), self.audio_sid)
......
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