Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sevabot/bot/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import settings

from sevabot.utils import fail_safe, ensure_unicode
from sevabot.utils import fail_safe, ensure_unicode, get_chat_id

logger = logging.getLogger("sevabot")

Expand Down Expand Up @@ -51,6 +51,7 @@ def run(self, msg, args, callback):
username = ensure_unicode(msg.Sender.Handle)
full_name = ensure_unicode(msg.Sender.FullName)
chat_name = ensure_unicode(msg.ChatName)
chat_id = ensure_unicode(get_chat_id(msg.Chat))

#timeout(execute_module, name, args, callback, default=)
def threaded_run():
Expand All @@ -62,6 +63,7 @@ def threaded_run():
env["SKYPE_USERNAME"] = username.encode("utf-8")
env["SKYPE_FULLNAME"] = full_name.encode("utf-8")
env["SKYPE_CHATNAME"] = chat_name.encode("utf-8")
env["SKYPE_CHATID"] = chat_id.encode("utf-8")

process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, env=env)
out = process.communicate()[0]
Expand Down