{"action":"created","issue":{"url":"https://api.github.com/repos/luckydonald/pytg/issues/85","repository_url":"https://api.github.com/repos/luckydonald/pytg","labels_url":"https://api.github.com/repos/luckydonald/pytg/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/luckydonald/pytg/issues/85/comments","events_url":"https://api.github.com/repos/luckydonald/pytg/issues/85/events","html_url":"https://github.com/luckydonald/pytg/issues/85","id":154860988,"number":85,"title":"send message to dialog list","user":{"login":"efazati","id":1132647,"avatar_url":"https://avatars.githubusercontent.com/u/1132647?v=3","gravatar_id":"","url":"https://api.github.com/users/efazati","html_url":"https://github.com/efazati","followers_url":"https://api.github.com/users/efazati/followers","following_url":"https://api.github.com/users/efazati/following{/other_user}","gists_url":"https://api.github.com/users/efazati/gists{/gist_id}","starred_url":"https://api.github.com/users/efazati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efazati/subscriptions","organizations_url":"https://api.github.com/users/efazati/orgs","repos_url":"https://api.github.com/users/efazati/repos","events_url":"https://api.github.com/users/efazati/events{/privacy}","received_events_url":"https://api.github.com/users/efazati/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-14T15:58:42Z","updated_at":"2016-05-17T11:47:21Z","closed_at":null,"body":"### The problem\r\nI want send msg to dialog list but i receive error. change peer id type and another things but not work again\r\nwhat can i do\r\n\r\n```\r\n\r\nimport pytg\r\nfrom pytg import argument_types as args\r\n\r\n\r\ndef main():\r\n    tg = pytg.Telegram(telegram=\"/home/argus/10days/telefollow/tg/bin/telegram-cli\", pubkey_file=\"/home/argus/.ssh/id_rsa.pub\")\r\n    result = tg.sender.dialog_list()\r\n    peer_id = args.Peer(str(result[0]['peer_id']))\r\n    string = args.UnicodeString('hiiiii')\r\n    tg.sender.send_msg(peer_id, string)\r\n```\r\n\r\n# Error\r\n```\r\nTraceback (most recent call last):\r\n  File \"sample.py\", line 21, in <module>\r\n    main()\r\n  File \"sample.py\", line 18, in main\r\n    tg.sender.send_msg(peer_id, string)\r\n  File \"/home/argus/10days/telefollow/env/local/lib/python2.7/site-packages/pytg/sender.py\", line 632, in command_alias\r\n    return self.execute_function(command_name, *args, **kwargs)\r\n  File \"/home/argus/10days/telefollow/env/local/lib/python2.7/site-packages/pytg/sender.py\", line 357, in execute_function\r\n    raise e\r\npytg.exceptions.FailException: Error 38: u'can not parse arg #1' (command u'[disable_preview] msg <1051030938> <hiiiii>\\n')\r\n\r\n```\r\ni use str but not work too\r\n\r\n### Your environment\r\npy: 2.7 and ubuntu\r\n"},"comment":{"url":"https://api.github.com/repos/luckydonald/pytg/issues/comments/219694502","html_url":"https://github.com/luckydonald/pytg/issues/85#issuecomment-219694502","issue_url":"https://api.github.com/repos/luckydonald/pytg/issues/85","id":219694502,"user":{"login":"Nanoseb","id":10603482,"avatar_url":"https://avatars.githubusercontent.com/u/10603482?v=3","gravatar_id":"","url":"https://api.github.com/users/Nanoseb","html_url":"https://github.com/Nanoseb","followers_url":"https://api.github.com/users/Nanoseb/followers","following_url":"https://api.github.com/users/Nanoseb/following{/other_user}","gists_url":"https://api.github.com/users/Nanoseb/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanoseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanoseb/subscriptions","organizations_url":"https://api.github.com/users/Nanoseb/orgs","repos_url":"https://api.github.com/users/Nanoseb/repos","events_url":"https://api.github.com/users/Nanoseb/events{/privacy}","received_events_url":"https://api.github.com/users/Nanoseb/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T11:47:21Z","updated_at":"2016-05-17T11:47:21Z","body":"You need to specify the `print_name` instead of the `peer_id`.\r\nMoreover it seems that your pubkey file is not the right one, it has to be the one called `server.pub` from the telegram-cli folder (it is the pubkey of telegram servers not from your computer)"}}