JavaSteam icon indicating copy to clipboard operation
JavaSteam copied to clipboard

Add support for uploading images (chat)

Open Longi94 opened this issue 5 years ago • 2 comments

Longi94 avatar Jan 11 '19 15:01 Longi94

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:

  1. ServiceMethod (in) CloudClient.NotifyAppStateChange#1
  2. ServiceMethodCallFromClient (out) Cloud.GetAppFileChangelist#1
  3. ServiceMethod (in) FriendMessagesClient.IncomingMessage#1
  4. 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.

LossyDragon avatar Jan 12 '22 00:01 LossyDragon

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

LossyDragon avatar May 08 '24 01:05 LossyDragon