Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Update SteamUnifiedMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
seishun committed Jun 5, 2020
1 parent b0386c5 commit a6e4603
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/handlers/unified_messages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ require('util').inherits(SteamUnifiedMessages, EventEmitter);

SteamUnifiedMessages.prototype.send = function(methodName, body, callback) {
var eresult;
Steam.Unified.Internal[this._service][methodName](function(method, req, cb) {
Steam.Internal[this._service][methodName](function(method, req, cb) {
this._client.send({
msg: EMsg.ClientServiceMethod,
msg: EMsg.ClientServiceMethodLegacy,
proto: {}
}, new schema.CMsgClientServiceMethod({
}, new schema.CMsgClientServiceMethodLegacy({
method_name: this._service + '.' + methodName + '#1',
serialized_method: req.toBuffer(),
is_notification: !callback
}).toBuffer(), callback && function(header, body) {
eresult = header.proto.eresult;
var resp = schema.CMsgClientServiceMethodResponse.decode(body);
var resp = schema.CMsgClientServiceMethodLegacyResponse.decode(body);
cb(null, resp.serialized_method_response);
});
}.bind(this), body, function(err, res) {
Expand All @@ -51,7 +51,7 @@ handlers[EMsg.ServiceMethod] = function(header, body) {
if (jobName.split('.')[0] != this._service)
return;
var methodName = jobName.split(/\W/)[1];
Steam.Unified.Internal[this._service][methodName](function(method, req) {
Steam.Internal[this._service][methodName](function(method, req) {
this.emit('message', methodName, Steam._processProto(req));
}.bind(this), body);
};
Expand Down

0 comments on commit a6e4603

Please sign in to comment.