Add support for uploading images (chat)
This is a "Unified Messages" feature.
I'm not sure how images are being uploaded physically. But doing a quick glance with NHA2, I see 4 messages when uploading an image:
- ServiceMethod (in) CloudClient.NotifyAppStateChange#1
- ServiceMethodCallFromClient (out) Cloud.GetAppFileChangelist#1
- ServiceMethod (in) FriendMessagesClient.IncomingMessage#1
- ServiceMethodResponse (in) Cloud.GetAppFileChangelist#1
Step 3 is just an incoming response of the chat message, containing the image in bbcode Step 4 appears to be a list of recent uploaded images.
I looked into this more and found the mobile app and web chat use the following urls when uploading.
https://steam-chat.com/chat/beginfileupload/ https://steam-chat.com/chat/commitfileupload/
With this information, I looked online and noticed steam.py has already implemented this, this may be a good point to understand and possibly implement
https://github.com/Gobot1234/steam.py/blob/ba5d8199898f133543ce77dab127958c0228d352/steam/http.py#L1095