{"action":"created","issue":{"url":"https://api.github.com/repos/tgalal/yowsup/issues/581","labels_url":"https://api.github.com/repos/tgalal/yowsup/issues/581/labels{/name}","comments_url":"https://api.github.com/repos/tgalal/yowsup/issues/581/comments","events_url":"https://api.github.com/repos/tgalal/yowsup/issues/581/events","html_url":"https://github.com/tgalal/yowsup/issues/581","id":55451152,"number":581,"title":"sending image fail in legacy yowsup-cli","user":{"login":"morfeokmg","id":6172748,"avatar_url":"https://avatars.githubusercontent.com/u/6172748?v=3","gravatar_id":"","url":"https://api.github.com/users/morfeokmg","html_url":"https://github.com/morfeokmg","followers_url":"https://api.github.com/users/morfeokmg/followers","following_url":"https://api.github.com/users/morfeokmg/following{/other_user}","gists_url":"https://api.github.com/users/morfeokmg/gists{/gist_id}","starred_url":"https://api.github.com/users/morfeokmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morfeokmg/subscriptions","organizations_url":"https://api.github.com/users/morfeokmg/orgs","repos_url":"https://api.github.com/users/morfeokmg/repos","events_url":"https://api.github.com/users/morfeokmg/events{/privacy}","received_events_url":"https://api.github.com/users/morfeokmg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-26T06:38:39Z","updated_at":"2015-01-26T06:58:13Z","closed_at":null,"body":"Let me if understand your change, we need two steps for send the image to the smartphone. \r\n1. Upload the image to the wattsapp server. \r\n2. Send the message to the group or participant, as the image uploaded.\r\n\r\nMy question is: what kind of message we need for send the image in step 2. (text, url, image) \r\nWhat I need implement for end the module??\r\n\r\nI implement the legacy version for my server and I have reports on image format, my idea is send these one's to my wattsapp. Only I need the second step for complete this one.\r\n\r\nI review the code but I don't the implementation for the command, I know how can with xml, only need the information for the command of send the image (that I understand the the command for upload is very different for the step 2nd)\r\nmorfeokmg\r\n \r\nmorfeokmg commented 17 days ago\r\nThis is my test. \r\nI executed in debug mode.\r\n\r\n....\r\nYowsupConnectionManager: starting reader\r\nYowsupConnectionManager: started\r\nSending picture /home/morfeokmg/watts/Caso1.jpg of size 42781 with name Caso1.jpg\r\nSending media_requestUpload\r\nBinTreeNodeWriter: Outgoing\r\nBinTreeNodeWriter:\r\n\r\n\r\n\r\n\r\n......\r\n\r\nBinTreeNodeReader:  Incoming\r\nBinTreeNodeReader:  \r\n<iq type=\"result\" from=\"s.whatsapp.net\" id=\"upload_1\">\r\n    <duplicate mimetype=\"image/jpeg\"     filehash=\"hsjVxrz8M1Z0J8nNmQAcBph3NIsuU6SDiNl6xiGp6OM=\"     url=\"https://mmi631.whatsapp.net/d/AubJPvfWLCHP69u3qvJxNxoTVl1N0wNkjuC0mnt4B5t0.jpg\"     height=\"434\" width=\"700\" type=\"image\" size=\"42781\">\r\n    </duplicate>\r\n</iq>\r\n\r\nRequest Dublicate: hash: hsjVxrz8M1Z0J8nNmQAcBph3NIsuU6SDiNl6xiGp6OM= url:     https://mmi631.whatsapp.net/d/AubJPvfWLCHP69u3qvJxNxoTVl1N0wNkjuC0mnt4B5t0.jpg \r\nSending message_image\r\nBinTreeNodeWriter:  Outgoing\r\nBinTreeNodeWriter:  \r\n<message to=\"XXXXXXX-XXXXX@g.us\" type=\"text\" id=\"1420751496-0\">\r\n    <media     url=\"https://mmi631.whatsapp.net/d/AubJPvfWLCHP69u3qvJxNxoTVl1N0wNkjuC0mnt4B5t0.jpg\"     type=\"image\" file=\"Caso1.jpg\" size=\"42781\">\r\n    796573\r\n    </media>\r\n    <x xmlns=\"jabber:x:event\">\r\n        <server>\r\n        </server>\r\n    </x>\r\n</message>\r\n\r\nBinTreeNodeReader:  Incoming\r\nBinTreeNodeReader:  \r\n<ack count=\"5\" t=\"1420751480\" from=\"XXXXXXXXXXX@g.us\" id=\"XXXXXXX-0\" class=\"message\">\r\n</ack>\r\n\r\nGot request MediaReceipt\r\nPlease, I need know what I need modify or implement in the code in the Legacy version!!!!.\r\n\r\nBest Regards."},"comment":{"url":"https://api.github.com/repos/tgalal/yowsup/issues/comments/71420793","html_url":"https://github.com/tgalal/yowsup/issues/581#issuecomment-71420793","issue_url":"https://api.github.com/repos/tgalal/yowsup/issues/581","id":71420793,"user":{"login":"morfeokmg","id":6172748,"avatar_url":"https://avatars.githubusercontent.com/u/6172748?v=3","gravatar_id":"","url":"https://api.github.com/users/morfeokmg","html_url":"https://github.com/morfeokmg","followers_url":"https://api.github.com/users/morfeokmg/followers","following_url":"https://api.github.com/users/morfeokmg/following{/other_user}","gists_url":"https://api.github.com/users/morfeokmg/gists{/gist_id}","starred_url":"https://api.github.com/users/morfeokmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morfeokmg/subscriptions","organizations_url":"https://api.github.com/users/morfeokmg/orgs","repos_url":"https://api.github.com/users/morfeokmg/repos","events_url":"https://api.github.com/users/morfeokmg/events{/privacy}","received_events_url":"https://api.github.com/users/morfeokmg/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T06:58:13Z","updated_at":"2015-01-26T06:58:13Z","body":"Analysing the steps, I see these parameters, but i don't know what are the corrects for send\r\n\r\n     X-WA-Metadata: filetype=jpg; filehash=hsjVxrz8M1Z0J8nNmQAcBph3NIsuU6SDiNl6xiGp6OM=;      type=image; width=700; height=434\r\n\r\n     {\"name\":\"314aac882ecc00a9b288d83f61c9ed83.jpg\",\"url\":\"https://mmi648.whatsapp.net/d/AubJPvfWLCHP69u3qvJxNxoTVl1N0wNkjuC0mnt4B5t0.jpg\",\"size\":\"42781\",\"mimetype\":\"image/jpeg\",\"filehash\":\"hsjVxrz8M1Z0J8nNmQAcBph3NIsuU6SDiNl6xiGp6OM=\",\"type\":\"image\",\"width\":\"700\",\"height\":\"434\"}\r\n      Progress: 100MediaUploader:    {'mimetype': u'image/jpeg', 'name':      u'314aac882ecc00a9b288d83f61c9ed83.jpg', 'filehash':      u'hsjVxrz8M1Z0J8nNmQAcBph3NIsuU6SDiNl6xiGp6OM=', 'url':      u'https://mmi648.whatsapp.net/d/AubJPvfWLCHP69u3qvJxNxoTVl1N0wNkjuC0mnt4B5t0.jpg',      'height': u'434', 'width': u'700', 'error': None, 'type': u'image', 'size': u'42781'}\r\n\r\nI tried with variations of these ones:\r\n\r\nmmNode = ProtocolTreeNode(\"media\", {\"type\":mediaType,\"file\":name,\"size\":size,\"url\":url},None, args[4:][0] if args[4:] else None);\r\n\r\nProtocolTreeNode(\"media\", {\"type\":\"location\",\"latitude\":latitude,\"longitude\":longitude},None,preview)\r\n\r\n\r\n"}}