@liveblocks/core
Advanced tools
Changelog
v2.20.0
@liveblocks/client
UserNotificationSettings
object to return
null
to prevent any errors when accessing a disabled notification channel.@liveblocks/node
UserNotificationSettings
object to return
null
to prevent any errors when accessing a disabled notification channel.@liveblocks/react
useRoom({ allowOutsideRoom: true })
option. When this option is
set, the hook will return null
when used outside of a room, whereas the
default behavior of the hook is be to throw.UserNotificationSettings
object to return
null
to prevent any errors when accessing a disabled notification channel.@liveblocks/react-ui
v2.18.3
when we added support for whitespace within mentions.Composer
.Changelog
v2.19.0
@liveblocks/*
@liveblocks/node
getStorageDocument("my-room", "json")
typing in its output LiveMap
instances as ReadonlyMap
instead of serialized plain objects.Changelog
v2.18.3
@liveblocks/node
stringifyCommentBody
utility.@liveblocks/client
stringifyCommentBody
utility.@liveblocks/react
useUserThreads_experimental
hook.@liveblocks/react-ui
@liveblocks/emails
v2.18.0
as it provided no
measurable benefits while increasing complexity.Changelog
v2.18.2
@liveblocks/client
@liveblocks/react-tiptap
Changelog
v2.18.1
@liveblocks/react-ui
<Composer />
and <Comment />
overrides not working when set on
<Thread />
.@liveblocks/yjs
getYjsProviderForRoom
to grab an instance of yjs
provider that will be automatically cleaned up when the room is
disconnected/changedLiveblocksYjsProvider
@liveblocks/react-tiptap
Changelog
v2.18.0
Introducing user notification settings. You can now create beautiful user notification settings pages into your app.
Our packages @liveblocks/client
, @liveblocks/react
and @liveblocks/node
are now exposing functions to manage user notification settings on different
notification channels and kinds.
You can support thread
, textMention
and custom notification kinds (starting
by a $
) on email
, Slack
, Microsoft Teams
and Web Push
channels.
You can choose from our new notifications dashboard page to enable or disable notification kinds on every channels you want to use in your app. It means our internal notification system on our infrastructure will decide to send or not an event on your webhook.
@liveblocks/client
We're adding two new methods in our client to get and update user notification settings:
import { createClient } from '@liveblocks/client'
const client = createClient({ ... })
const settings = await client.getNotificationSettings();
// { email: { thread: true, ... }, slack: { thread: false, ... }, ... }
console.log(settings);
const updatedSettings = await client.updateNotificationSettings({
email: {
thread: false,
}
});
@liveblocks/react
We're adding a new set of hooks to manage user notification settings.
You can either choose useNotificationSettings
is your need to get the current
user notification settings and update them at the same time:
// A suspense version of this hook is available
import { useNotificationSettings } from "@liveblocks/react";
const [{ isLoading, error, settings }, updateSettings] =
useNotificationSettings();
// { email: { thread: true, ... }, slack: { thread: false, ... }, ... }
console.log(settings);
const onSave = () => {
updateSettings({
slack: {
textMention: true,
},
});
};
Or you can choose useUpdateNotificationSettings
if you just need to update the
current user notification settings (e.g an unsubscribe button):
// A suspense version of this hook is available
import { useUpdateNotificationSettings } from "@liveblocks/react";
const updateSettings = useUpdateNotificationSettings();
const onUnsubscribe = () => {
updateSettings({
slack: {
thread: false,
},
});
};
@liveblocks/node
Our Node.js client are now exposing three new methods to manage user notification settings:
import { Liveblocks } from "@liveblocks/node";
const liveblocks = new Liveblocks({ secret: "sk_xxx" });
const settings = await liveblocks.getNotificationSettings({ userId });
// { email: { thread: true, ... }, slack: { thread: false, ... }, ... }
console.log(settings);
const updatedSettings = await liveblocks.updateNotificationSettings({
userId,
data: {
teams: {
$fileUploaded: true,
},
},
});
await liveblocks.deleteNotificationSettings({ userId });
@liveblocks/emails
prepareThreadNotificationEmailAsHtml
and
prepareThreadNotificationEmailAsReact
: the contents of previous emails data
are now taken into account to avoid repeating mentions and replies that are
still unread but have already been extracted in another email data.