mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-23 23:23:29 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e299623452 | ||
|
|
29b31009ce | ||
|
|
fbfff1398b | ||
|
|
6cd06c3adf | ||
|
|
d35e3c107c |
2
.idea/steamcommunity.iml
generated
2
.idea/steamcommunity.iml
generated
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
|
||||
@@ -5,9 +5,9 @@ module.exports = CConfirmation;
|
||||
function CConfirmation(community, data) {
|
||||
Object.defineProperty(this, "_community", {"value": community});
|
||||
|
||||
this.id = data.id;
|
||||
this.id = data.id.toString();
|
||||
this.type = data.type;
|
||||
this.creator = data.creator;
|
||||
this.creator = data.creator.toString();
|
||||
this.key = data.key;
|
||||
this.title = data.title;
|
||||
this.receiving = data.receiving;
|
||||
|
||||
@@ -552,6 +552,8 @@ SteamCommunity.prototype.sendImageToUser = function(userID, imageContentsBuffer,
|
||||
imageHash.update(imageContentsBuffer);
|
||||
imageHash = imageHash.digest('hex');
|
||||
|
||||
var filename = Date.now() + '_image.' + imageDetails.type;
|
||||
|
||||
this.httpRequestPost({
|
||||
uri: 'https://steamcommunity.com/chat/beginfileupload/?l=english',
|
||||
headers: {
|
||||
@@ -561,7 +563,7 @@ SteamCommunity.prototype.sendImageToUser = function(userID, imageContentsBuffer,
|
||||
sessionid: this.getSessionID(),
|
||||
l: 'english',
|
||||
file_size: imageContentsBuffer.length,
|
||||
file_name: 'image.' + imageDetails.type,
|
||||
file_name: filename,
|
||||
file_sha: imageHash,
|
||||
file_image_width: imageDetails.width,
|
||||
file_image_height: imageDetails.height,
|
||||
@@ -623,7 +625,7 @@ SteamCommunity.prototype.sendImageToUser = function(userID, imageContentsBuffer,
|
||||
formData: { // it's multipart again
|
||||
sessionid: this.getSessionID(),
|
||||
l: 'english',
|
||||
file_name: 'image.' + imageDetails.type,
|
||||
file_name: filename,
|
||||
file_sha: imageHash,
|
||||
success: '1',
|
||||
ugcid: startResult.ugcid,
|
||||
|
||||
Reference in New Issue
Block a user