From 654444e4ff607cf95f212ea8fd3594dc1e4f273d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Janowski?= Date: Wed, 8 Nov 2023 11:31:13 +0100 Subject: [PATCH 1/3] fix(lib): fix typo in setRestrictions method name --- lib/src/entities/channel.ts | 4 ++-- lib/src/entities/chat.ts | 2 +- lib/src/entities/user.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/entities/channel.ts b/lib/src/entities/channel.ts index 217a82c..fc4c41c 100644 --- a/lib/src/entities/channel.ts +++ b/lib/src/entities/channel.ts @@ -681,10 +681,10 @@ export class Channel { * Moderation restrictions */ - async setResctrictions(user: User, params: { ban?: boolean; mute?: boolean }) { + async setRestrictions(user: User, params: { ban?: boolean; mute?: boolean }) { if (!(this.chat.sdk as any)._config.secretKey) throw "Moderation restrictions can only be set by clients initialized with a Secret Key." - return this.chat.setResctrictions(user.id, this.id, params) + return this.chat.setRestrictions(user.id, this.id, params) } /* @internal */ diff --git a/lib/src/entities/chat.ts b/lib/src/entities/chat.ts index 56e27ab..b6dd9d4 100644 --- a/lib/src/entities/chat.ts +++ b/lib/src/entities/chat.ts @@ -1080,7 +1080,7 @@ export class Chat { * Moderation restrictions */ - async setResctrictions( + async setRestrictions( userId: string, channelId: string, params: { ban?: boolean; mute?: boolean } diff --git a/lib/src/entities/user.ts b/lib/src/entities/user.ts index 5301812..a4852f2 100644 --- a/lib/src/entities/user.ts +++ b/lib/src/entities/user.ts @@ -143,10 +143,10 @@ export class User { * Moderation restrictions */ - async setResctrictions(channel: Channel, params: { ban?: boolean; mute?: boolean }) { + async setRestrictions(channel: Channel, params: { ban?: boolean; mute?: boolean }) { if (!(this.chat.sdk as any)._config.secretKey) throw "Moderation restrictions can only be set by clients initialized with a Secret Key." - return this.chat.setResctrictions(this.id, channel.id, params) + return this.chat.setRestrictions(this.id, channel.id, params) } /* @internal */ From a685a985ffcd1b98c6a0e6351812104d4adc8994 Mon Sep 17 00:00:00 2001 From: PubNub Release Bot <120067856+pubnub-release-bot@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:39:14 +0000 Subject: [PATCH 2/3] PubNub SDK v0.3.1 release. --- .pubnub.yml | 7 ++++++- lib/package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.pubnub.yml b/.pubnub.yml index 27de23d..fcc0d7a 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,11 +1,16 @@ --- name: pubnub-js-chat -version: v0.3.0 +version: v0.3.1 scm: github.com/pubnub/js-chat schema: 1 files: - lib/dist/index.js changelog: + - date: 2023-11-08 + version: v0.3.1 + changes: + - type: bug + text: "Typo in moderation setRestrictions method names." - date: 2023-11-07 version: v0.3.0 changes: diff --git a/lib/package.json b/lib/package.json index c51e387..67231bc 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,6 +1,6 @@ { "name": "@pubnub/chat", - "version": "0.3.0", + "version": "0.3.1", "description": "PubNub JavaScript Chat SDK", "author": "PubNub ", "license": "SEE LICENSE IN LICENSE", From cba0a5f88dfc658faab7842f35aa4c19d1f74755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Janowski?= Date: Wed, 8 Nov 2023 11:48:46 +0100 Subject: [PATCH 3/3] chore: update pubnub dep --- .pubnub.yml | 4 +++- lib/package.json | 2 +- yarn.lock | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.pubnub.yml b/.pubnub.yml index fcc0d7a..e90c0bd 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -9,13 +9,15 @@ changelog: - date: 2023-11-08 version: v0.3.1 changes: + - type: feature + text: "Updated pubnub dependency to 7.4.3." - type: bug text: "Typo in moderation setRestrictions method names." - date: 2023-11-07 version: v0.3.0 changes: - type: feature - text: "Updated pubnub dependency." + text: "Updated pubnub dependency to 7.4.2." - type: feature text: "New type of software license." - type: feature diff --git a/lib/package.json b/lib/package.json index 67231bc..eab16b7 100644 --- a/lib/package.json +++ b/lib/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/pubnub/js-chat#readme", "dependencies": { - "pubnub": "7.4.2" + "pubnub": "7.4.3" }, "devDependencies": { "@babel/core": "7.22.15", diff --git a/yarn.lock b/yarn.lock index 0b97517..24e3581 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2759,10 +2759,10 @@ vue "3.2.30" "@pubnub/chat@*", "@pubnub/chat@file:/Users/przemyslaw.janowski/Code/js-chat/lib": - version "0.2.0" + version "0.3.1" resolved "file:lib" dependencies: - pubnub "7.4.2" + pubnub "7.4.3" "@react-native-community/cli-clean@11.3.6": version "11.3.6" @@ -11738,10 +11738,10 @@ proxy-from-env@^1.1.0: resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -pubnub@7.4.2: - version "7.4.2" - resolved "https://registry.npmjs.org/pubnub/-/pubnub-7.4.2.tgz" - integrity sha512-jwt/3XW6QnWgutGpHSlnPJcRDhea0BrkJclU9PeUNsJpaNb94nNOHxDzMWan7waB7svQikYoqV2TSiN7oU+xcg== +pubnub@7.4.3: + version "7.4.3" + resolved "https://registry.npmjs.org/pubnub/-/pubnub-7.4.3.tgz" + integrity sha512-eGxOaF8mHThu5V/EA8IyinwwNnoDTVwhRFX/HSIedKx5mmHtu8zupFw4DP3MJuC85Ts2T2SkyyNvjn/XHeR2fA== dependencies: agentkeepalive "^3.5.2" buffer "^6.0.3"