New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bulbul-chat

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bulbul-chat - npm Package Compare versions

Comparing version 2.9.0 to 2.9.1

2

dist/package.json
{
"name": "bulbul-chat",
"version": "2.9.0",
"version": "2.9.1",
"description": "",

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

@@ -136,3 +136,8 @@ export declare type ChatMessageType = 'plaintext' | 'image' | 'video' | 'audio' | 'document' | 'location' | 'contact' | 'file' | 'url' | 'card';

skipEmpty?: boolean;
metadata?: Record<any, any>;
}): Promise<ChatChannel[]>;
getChannels(filter?: {
skipEmpty?: boolean;
metadata?: Record<string, string>;
}): Promise<ChatChannel[]>;
loadMessagesBeforeId(channelId: string, messageIdBefore: number, size: number): Promise<ChatMessage[]>;

@@ -139,0 +144,0 @@ loadMessagesAfterId(channelId: string, messageIdAfter: number, size: number): Promise<ChatMessage[]>;

@@ -351,2 +351,4 @@ "use strict";

filters['externalId'] = channelExternalId;
if (filter === null || filter === void 0 ? void 0 : filter.metadata)
filters['metadata'] = JSON.stringify(filter.metadata);
return [4 /*yield*/, this.executeHTTP('GET', '/api/client/chat/channels', { filter: __assign(__assign({}, filters), filter) }, {})];

@@ -361,2 +363,25 @@ case 1:

};
ChatClient.prototype.getChannels = function (filter) {
return __awaiter(this, void 0, void 0, function () {
var filters, channels, error_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
filters = { listed: false };
if (filter === null || filter === void 0 ? void 0 : filter.metadata)
filters['metadata'] = JSON.stringify(filter.metadata);
return [4 /*yield*/, this.executeHTTP('GET', '/api/client/chat/channels', { filter: __assign(__assign({}, filters), filter) }, {})];
case 1:
channels = _a.sent();
return [2 /*return*/, channels];
case 2:
error_2 = _a.sent();
console.log(error_2);
return [2 /*return*/, []];
case 3: return [2 /*return*/];
}
});
});
};
ChatClient.prototype.loadMessagesBeforeId = function (channelId, messageIdBefore, size) {

@@ -363,0 +388,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -43,4 +43,8 @@ import ChannelMessageStorage from './ChannelMessageStorage';

loadEarlierChannels(): void;
getChannels(filter?: {
skipEmpty?: boolean;
metadata?: Record<any, any>;
}): Promise<ChatChannel[]>;
}
export default ChatService;
//# sourceMappingURL=ChatService.d.ts.map

@@ -638,2 +638,9 @@ "use strict";

};
ChatService.prototype.getChannels = function (filter) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.chatClient.getChannels(filter)];
});
});
};
return ChatService;

@@ -640,0 +647,0 @@ }());

{
"name": "bulbul-chat",
"version": "2.9.0",
"version": "2.9.1",
"description": "",

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

@@ -451,3 +451,3 @@ import * as qs from 'qs';

channelExternalId?: string,
filter?: { skipEmpty?: boolean }
filter?: { skipEmpty?: boolean; metadata?: Record<any, any> }
): Promise<ChatChannel[]> {

@@ -458,2 +458,4 @@ const filters: any = { listed: false };

if (channelExternalId) filters['externalId'] = channelExternalId;
if (filter?.metadata)
filters['metadata'] = JSON.stringify(filter.metadata);
const channels: ChatChannel[] = await this.executeHTTP(

@@ -471,2 +473,22 @@ 'GET',

}
async getChannels(filter?: {
skipEmpty?: boolean;
metadata?: Record<string, string>;
}): Promise<ChatChannel[]> {
try {
const filters: any = { listed: false };
if (filter?.metadata)
filters['metadata'] = JSON.stringify(filter.metadata);
const channels: ChatChannel[] = await this.executeHTTP(
'GET',
'/api/client/chat/channels',
{ filter: { ...filters, ...filter } },
{}
);
return channels;
} catch (error) {
console.log(error);
return [];
}
}

@@ -473,0 +495,0 @@ async loadMessagesBeforeId(

@@ -524,4 +524,11 @@ import { diffInSeconds } from './utils';

}
async getChannels(filter?: {
skipEmpty?: boolean;
metadata?: Record<any, any>;
}): Promise<ChatChannel[]> {
return this.chatClient.getChannels(filter);
}
}
export default ChatService;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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