Documentation Release Notes - June 2024
Tags: pubnub, documentation, releases, releasenotes
Published: 2024-07-08 12:36:45

This article was originally published at [https://www.pubnub.com/docs/release-notes/2024/june](https://www.pubnub.com/docs/release-notes/2024/june?)

Hey there! We’ve got some fresh updates for you this month.

-   We introduced a new referential integrity flag to help keep your data consistent.
-   You can now set channel group limits directly from the Admin Portal.
-   Try importing data from Insights to BizOps to test its features.
-   Plus, you'll notice a revamped look and feel for Presence Management.

Other than that, we made a bunch of small but significant improvements in the docs that will hopefully answer some of your questions or dispel any doubts you had when working with PubNub.

Happy exploring, and thanks for being a part of our community!

General 🛠️
-----------

### Custom fields in FCM payloads

**Type**: Improvement

We fixed the docs for the [Android Mobile Push Notifications](https://pubnub.com/docs/general/push/android#step-5-construct-the-push-payload) by adding the missing custom PubNub parameters that you can add to your FCM Mobile Push Notification payload: `pn_debug`, `pn_exceptions`, and `pn_dry_run`.

They'll let you test or debug notifications and exclude selected devices from receiving notifications.

Here’s a sample FCM payload with our custom fields:

```js
{
  "pn_fcm": {
    "notification": {
      "title": "My Title",
      "body": "Message sent at"
 },
    "pn_collapse_id": "collapse-id",
    "pn_exceptions": [
      "optional-excluded-device-token1"
 ]
 },
  "pn_debug": true,
  "pn_dry_run": false
}
```

### Channel group limits

**Type**: New feature

The Stream Controller in the Admin Portal has a new, configurable [Channel group limit](https://pubnub.com/docs/general/metadata/basics#configuration) option for customers on [paid pricing plans](https://www.pubnub.com/pricing/?), which lets you set the limits for the maximum number of channels that channel groups in a keyset can have. You can either lower the default limit of 1,000 channels or increase it up to 2,000 channels.

![Channel group limits](https://pubnub.com/assets/images/channel-group-limit-0dce418184343bd3e6e213b7f21f2038.png)

### User Metadata Events in App Context

**Type**: Improvement

We improved the docs to clarify that with the enabled **User Metadata Events** option, any modification to a user entity (`set` and `delete`) results in sending event notifications to any membership associations, so both that user and any channel they are a member of. Refer to the [docs](https://pubnub.com/docs/general/metadata/basics#app-context-events) for details.

![User metadata events](https://pubnub.com/assets/images/user-metadata-events-2774cded452142e6d79bdf1a92e95174.png)

### App Context configuration dependency

**Type**: Improvement

We updated the docs on [App Context configuration options](https://pubnub.com/docs/general/metadata/basics#configuration) to include information on a critical dependency.

![Get all user or channel metadata](https://pubnub.com/assets/images/get-all-metadata-bf21a99e67f554e65c818b7b71fb9011.png)

Although the **Disallow Get All Channel Metadata** and **Disallow Get All User Metadata** options seem pretty self-explanatory, the caveat is that these options work only with an enabled Access Manager.

In other words, without Access Manager, these active options don't actually disable getting metadata about users or channels on a keyset. At the same time, when you enable Access Manager, thus by default restricting access to all objects on a keyset, you can easily bypass Access Manager GET restrictions for users and channels by unchecking both of these configuration options without creating a fine-grained permissions schema.

Admin Portal UI will soon reflect that dependency as well.

### New referential integrity flag in App Context

**Type**: New feature

We added a new [**Enforce referential integrity for memberships**](https://pubnub.com/docs/general/metadata/basics#configuration) option, which is turned on by default when you enable App Context on your app's keyset in the Admin Portal.

![Referential integrity flag](https://pubnub.com/assets/images/referential-integrity-2288af8171ffc0c8a5c8b67d82106247.png)

This flag ensures that you can set a new membership only when both the user ID and channel ID for which you created the membership exist. At the same time, deleting a parent user or channel metadata entity automatically deletes any child membership associations for that deleted entity. This way, you ensure there are no malfunctioning or orphan membership objects on your keyset.

SDKs 📦
-------

### Python docs improvements

**Type**: Improvement

Following the feedback we received, we extended information on methods usage and execution. As a result, each Returns section in [Python SDK docs](https://pubnub.com/docs/sdks/python/api-reference/publish-and-subscribe) now describes the data fields returned by each method. It also explains how sync (`.sync()`) and async (`.pn_async(callback)`) request execution influences the returned data for each method.

### React SDK was deprecated

**Type**: Deprecation notice

Since we haven't been actively developing the React SDK for a while, we decided to finally officially deprecate its [docs](https://pubnub.com/docs/sdks/react) and move them to the [Call For Contributions](https://pubnub.com/docs/sdks#call-for-contributions) section in our docs.

If you find a bug in the React SDK or want to extend its functionality, feel free to create a pull request in the [repo](https://github.com/pubnub/react) and wait for our feedback!

Functions
---------

### Exporting Functions logs through Events & Actions

**Type**: New feature

Each PubNub Function saves logs in the internal `blocks-output-*` channel, like `blocks-output-NSPiAuYKsWSxJl4yBn30`, that can store up to 250 lines of logs before new ones overwrite them. If you don't want to lose track of old logs, you can now use Events & Actions to [export these logs](https://pubnub.com/docs/general/portal/functions#export-logs-through-events--actions) to an external service.

![Functions log](https://pubnub.com/assets/images/functions-log-c9c6bfa2ae883d738837c6fee563167d.png)

Insights 📊
-----------

### User duration & device metrics in REST API docs

**Type**: Improvement

[Last month](https://pubnub.com/docs/release-notes/2024/may#device-metrics-dashboard), we introduced the device metrics to the `User Behavior` dashboard in the PubNub Insights on the Admin Portal. This month, we updated the [REST API docs](https://pubnub.com/docs/sdks/rest-api/introduction-16) to include both the user duration and device metrics, so you can call the PubNub Insights API directly to get the metrics you're interested in.

BizOps Workspace 🏢
-------------------

### Top 20 users/channels

**Type**: New feature

If you don't use App Context to store and manage users and channels, you can still test the related BizOps Workspace features by imporing test data.

If you have access to PubNub Insights, you can access it by going to the **User Management** and **Channel Management** modules in BizOps Workspace in the Admin Portal and clicking the **Import from Insights** button.

As a result, you'll import from your app's keyset a maximum of 20 users who published the highest number of messages within the last day (if no messages were sent yesterday, users will be imported based on data from a day before).

![Top 20 users](https://pubnub.com/assets/images/top-20-users-346c252e218d37df861ff5ac04538f48.png)

Similarly to users, you can import from your app's keyset up to 20 channels with the highest number of messages published within the last day.

![Top 20 channels](https://pubnub.com/assets/images/top-20-channels-53fad13cd8e1f9a7619aee7330b2fffa.png)

Use this test data to explore what BizOps Workspace has to offer.

### Revamped Presence Management UX

**Type**: Improvement

We recently redesigned the whole [Presence Management](https://pubnub.com/docs/bizops-workspace/presence-management) module in BizOps Workspace to simplify the rule creation wizard, change badge colors to more inclusive ones, and add a "catch all" pattern config that reflects the default "enable Presence on all channels" setup of the Presence configuration on the keyset.

![Presence Management](https://pubnub.com/assets/images/presence-management-7799538afb99b2c891fc6d957737d819.png)

We hope you like its new look and feel!