Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fishpi

Package Overview
Dependencies
Maintainers
0
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fishpi - npm Package Compare versions

Comparing version 0.0.55 to 0.0.56

5

lib/chat.d.ts

@@ -82,3 +82,8 @@ import ReconnectingWebSocket from 'reconnecting-websocket';

send(user: string, content: string): Promise<ReconnectingWebSocket>;
/**
* 关闭用户私聊频道
* @param user 私聊用户名, 空为关闭所有用户频道
*/
close(user?: string): Promise<void>;
}
export default Chat;

@@ -346,4 +346,26 @@ "use strict";

};
/**
* 关闭用户私聊频道
* @param user 私聊用户名, 空为关闭所有用户频道
*/
Chat.prototype.close = function (user) {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
if (user && this._rwss[user]) {
this._rwss[user].close();
delete this._rwss[user];
}
else {
Object.keys(this._rwss).forEach(function (key) {
_this._rwss[key].close();
delete _this._rwss[key];
});
}
return [2 /*return*/];
});
});
};
return Chat;
}());
exports.default = Chat;

21

lib/chatroom.js

@@ -145,3 +145,3 @@ "use strict";

return __awaiter(this, void 0, void 0, function () {
var rsp, redpacket_1, e_1;
var rsp, e_1;
return __generator(this, function (_a) {

@@ -165,6 +165,5 @@ switch (_a.label) {

data[i].sysMetal = (0, utils_1.toMetal)(data[i].sysMetal);
redpacket_1 = JSON.parse(d.content);
if (redpacket_1.recivers)
redpacket_1.recivers = JSON.parse(redpacket_1.recivers);
data[i].content = redpacket_1;
data[i].content = JSON.parse(d.content);
if (data[i].content.recivers)
data[i].content.recivers = JSON.parse(data[i].content.recivers);
}

@@ -184,3 +183,3 @@ catch (e) { }

return __awaiter(this, void 0, void 0, function () {
var rsp_1, redpacket_2, e_2;
var rsp_1, redpacket_1, e_2;
return __generator(this, function (_a) {

@@ -204,8 +203,8 @@ switch (_a.label) {

data[i].sysMetal = (0, utils_1.toMetal)(data[i].sysMetal);
redpacket_2 = JSON.parse(d.content);
if (redpacket_2.msgType !== 'redPacket')
redpacket_1 = JSON.parse(d.content);
if (redpacket_1.msgType !== 'redPacket')
return rsp_1;
if (redpacket_2.recivers)
redpacket_2.recivers = JSON.parse(redpacket_2.recivers);
data[i].content = redpacket_2;
if (redpacket_1.recivers)
redpacket_1.recivers = JSON.parse(redpacket_1.recivers);
data[i].content = redpacket_1;
}

@@ -212,0 +211,0 @@ catch (e) { }

{
"name": "fishpi",
"version": "0.0.55",
"version": "0.0.56",
"description": "A Package to use API of fishpi.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -0,0 +0,0 @@ # 摸鱼派 API Package

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc