Skip to content

Releases: sendbird/sendbird-chat-sdk-javascript

4.22.5

04 Jun 05:13

Choose a tag to compare

Improvements

  • Add PushTokenRegistrationDetails.unique to control whether FCM/APNS push token registration replaces previously registered tokens

4.22.4

27 May 07:32

Choose a tag to compare

Improvements

  • Added early PushTokenRegistrationState.ERROR return with a warning log when FCM/APNS push token register/unregister receives an empty or whitespace-only token

4.22.3

13 May 14:03

Choose a tag to compare

Improvements

  • Fixed FileMessage / MultipleFilesMessage send requests to omit the message field when no caption is provided, instead of sending an empty string

4.22.2

07 May 03:29

Choose a tag to compare

Improvements

  • Fixed SendableMessage.sender being undefined in rare cases where the server payload omits sender information
  • Added support for Node.js 24 build environment and resolved high-severity npm audit issues (devDependencies only; published bundle is unaffected)

4.22.1

23 Apr 00:29

Choose a tag to compare

Improvements

  • Fix for the bug where the initial loading becomes slow when there is a large amount of channel data in the cache

4.22.0

26 Mar 03:19

Choose a tag to compare

Features

Weekly Do-Not-Disturb Schedule

Added support for per-day weekly DND scheduling. You can now configure different DND time windows for each day of the week, replacing the previous single-time window DND setting.

New methods:

  • setWeeklyDoNotDisturb(weeklyDndSchedules, timezone?) — Sets a weekly DND schedule
  • getWeeklyDoNotDisturb() — Gets the current weekly DND schedule
  • clearWeeklyDoNotDisturb() — Clears the weekly DND schedule

New types:

  • DndSchedule — Model class for managing per-day DND time windows
  • DndSchedulesPartial<Record<DayOfWeek, DndTimeWindow[]>>
  • DndTimeWindow{ startHour, startMin, endHour, endMin }
  • DndSchedulePreference{ doNotDisturbOn, dndSchedules?, timezone? }
  • DayOfWeek — Enum (sunday | monday | ... | saturday)

Deprecated

  • setDoNotDisturb() — Use setWeeklyDoNotDisturb() instead.
  • getDoNotDisturb() — Use getWeeklyDoNotDisturb() instead.
  • DoNotDisturbPreference — Use DndSchedulePreference instead.

Usage Examples

Set a weekly DND schedule

import { DndSchedule, DayOfWeek } from '@sendbird/chat';

const dndSchedule = new DndSchedule();

// Set weekdays to 22:00 ~ 23:59
dndSchedule.setWeekdays([
  { startHour: 22, startMin: 0, endHour: 23, endMin: 59 },
]);

// Set weekends to full-day DND
dndSchedule.setFullDay([DayOfWeek.SATURDAY, DayOfWeek.SUNDAY]);

const preference = await sb.setWeeklyDoNotDisturb(dndSchedule, 'Asia/Seoul');

Get current weekly DND schedule

const preference = await sb.getWeeklyDoNotDisturb();

console.log(preference.doNotDisturbOn); // true
console.log(preference.timezone);       // 'Asia/Seoul'
console.log(preference.dndSchedules);
// DndSchedule {
//   monday:    [{ startHour: 22, startMin: 0, endHour: 23, endMin: 59 }],
//   tuesday:   [{ startHour: 22, startMin: 0, endHour: 23, endMin: 59 }],
//   wednesday: [{ startHour: 22, startMin: 0, endHour: 23, endMin: 59 }],
//   thursday:  [{ startHour: 22, startMin: 0, endHour: 23, endMin: 59 }],
//   friday:    [{ startHour: 22, startMin: 0, endHour: 23, endMin: 59 }],
//   saturday:  [{ startHour: 0, startMin: 0, endHour: 23, endMin: 59 }],
//   sunday:    [{ startHour: 0, startMin: 0, endHour: 23, endMin: 59 }],
// }

Clear weekly DND schedule

await sb.clearWeeklyDoNotDisturb();

Migration from deprecated DND

// Before (deprecated)
await sb.setDoNotDisturb(true, 22, 0, 8, 0, 'Asia/Seoul');

// After
const dndSchedule = new DndSchedule();
dndSchedule.setWeekdays([
  { starHour: 0, startMin: 0, endHour: 8, endMin: 0 },
  { startHour: 22, startMin: 0, endHour: 23, endMin: 59 },
]);
await sb.setWeeklyDoNotDisturb(dndSchedule, 'Asia/Seoul');

Migration Notes

Important: When you call setWeeklyDoNotDisturb, any existing DND schedule configured via the deprecated setDoNotDisturb will be reset and replaced by the new weekly schedule. The two settings are mutually exclusive — once the weekly DND schedule is set, the previous DND configuration will no longer be in effect.

Improvements

  • Added joinedAt to Member
  • Fixed a bug where MMKV data was not trimmed after deletion
  • Fixed a bug where loadMore() pagination missed channels when an empty channel exists in the channel list

4.21.4

12 Mar 02:44

Choose a tag to compare

Improvements

  • Fixed a bug Where messages received during MessageCollection.initialize() could be lost
  • Add cancelStewardTask API to AIAgentModule for canceling steward tasks by message ID

4.21.3

25 Feb 09:00

Choose a tag to compare

Improvements

  • CHANNEL_IS_FROZEN(900050) errors are no longer included in the AutoResend retry logic

4.21.2

12 Feb 05:30

Choose a tag to compare

Improvements

  • Fixed a bug where not all channels were fetched when GroupChannel ChangeLogSync failed

4.21.1

06 Feb 01:58

Choose a tag to compare

Improvements

  • Fixed an issue where event callbacks were not triggered correctly in certain environments