Documentation Release Notes - May 2024
Tags: pubnub, documentation, releases, releasenotes
Published: 2024-07-08 10:46:15

Welcome to this month's release notes! PubNub is bringing you a bundle of updates designed to streamline your work and add a dash of convenience.

What's in the package?

We've unified App Context data filtering docs, revamped the event listener architecture for Python and Asyncio, and added new tools aiming to help you get started with secure chat moderation.

On the Admin Portal front, we've upped our game with detailed device metrics, improved event management with batching and enveloping options, and rolled out spiffy new stacked bar charts and variable features in Illuminate.

Plus, our docs and website now have a new search engine with an AI sidekick to help you find exactly what you need.

Dive right in and explore the goodies!

General 🛠️[​](https://pubnub.com/docs/release-notes/2024/may#general-️ "Direct link to General 🛠️")
-----------------------------------------------------------------------------------------------------

### Unified info on filtering App Context data[​](https://pubnub.com/docs/release-notes/2024/may#unified-info-on-filtering-app-context-data "Direct link to Unified info on filtering App Context data")

**Type**: Enhancement

**Description**: Based on the feedback, we've reviewed and unified information from various SDKs on filtering user, channel, and membership data using PubNub's App Context API. As a result, we've created one [App Context Filtering](https://pubnub.com/docs/general/metadata/filtering) document (backed up by numerous examples) that serves as an entry point for any data filtering queries.

Learn:

-   Which user, channel, and membership data you can filter.
-   Which filtering operators to use.
-   How you can filter the data through practical examples.

```js
   pubnub.objects.getAllChannelMetadata({
       filter: '["description"] LIKE "*support*"'
   })
```

SDKs 📦[​](https://pubnub.com/docs/release-notes/2024/may#sdks- "Direct link to SDKs 📦")
-----------------------------------------------------------------------------------------

### Updated event listeners architecture for Python & Asyncio[​](https://pubnub.com/docs/release-notes/2024/may#updated-event-listeners-architecture-for-python--asyncio "Direct link to Updated event listeners architecture for Python & Asyncio")

**Type**: New feature

**Description**: The new event listeners architecture for [Python](https://pubnub.com/docs/sdks/python/api-reference/publish-and-subscribe) and [Asyncio](https://pubnub.com/docs/sdks/asyncio/api-reference/publish-and-subscribe) SDKs introduces more narrowly scoped ways of managing subscriptions and listening to events compared to the previous monolithic PubNub object.

While the PubNub object still serves as a global scope and remains backward compatible, the new architecture offers "entity" objects such as channels, channel groups, user metadata, and channel metadata that return Subscription objects.

These Subscriptions allow for subscribe/unsubscribe methods and `addListener`/`removeListener` methods specific to single entities, offering a more flexible and independent way to manage real-time events and reducing the need for global state management.

```js
# entity-based, local-scoped
subscription = pubnub.channel(f'{channel}').subscription(with_presence: bool = False)
```

Chat 💬[​](https://pubnub.com/docs/release-notes/2024/may#chat- "Direct link to Chat 💬")
-----------------------------------------------------------------------------------------

### Sample for secure moderation in Chat SDK[​](https://pubnub.com/docs/release-notes/2024/may#sample-for-secure-moderation-in-chat-sdk "Direct link to Sample for secure moderation in Chat SDK")

**Type**: New feature

**Description**: Our chat team has created a simple [Access Manager API service](https://github.com/pubnub/js-chat/blob/master/samples/access-manager-api/README.md) to help you understand the end-to-end scenario for securing Chat SDK apps with Access Manager. This service mocks a simple endpoint and includes a sample permission set that you can use to set up server-side authorization for your Chat SDK apps with Access Manager enabled.

Go through the whole test scenario using our React Native Chat App (for user interaction), Channel Monitor (for user moderation, like muting and banning), and Access Manager API (for generating authorization tokens).

For the detailed steps, refer to the [How to Securely Moderate Chat and Users with BizOps Workspace](https://www.pubnub.com/how-to/securely-moderate-chat-and-users/?utm_source=devto&utm_medium=syndication&utm_campaign=off_domain&utm_content=en) blog.

![Muted user](https://pubnub.com/assets/images/muted-user-b18b4534be183d6d207ceeff685e5b44.png)

Insights 📊[​](https://pubnub.com/docs/release-notes/2024/may#insights- "Direct link to Insights 📊")
-----------------------------------------------------------------------------------------------------

### Device metrics dashboard[​](https://pubnub.com/docs/release-notes/2024/may#device-metrics-dashboard "Direct link to Device metrics dashboard")

**Type**: Enhancement

**Description**: We've extended the `User Behavior` dashboard in Insights to include [device type metrics](https://pubnub.com/docs/pubnub-insights/dashboards/user-behavior). This lets you dive deep into your users' behavior per device type. From now on, you can observe where your app users publish or subscribe most often (iOS, Android, and Windows) and check the number of unique users per device type.

This insight can help you build custom features by device and, thus, improve customer experience.

![User behavior &amp; devices](https://pubnub.com/assets/images/device-type-1ba35d904878d48813e07a9f581193d5.png)

Events & Actions ⚡[​](https://pubnub.com/docs/release-notes/2024/may#events--actions- "Direct link to Events & Actions ⚡")
--------------------------------------------------------------------------------------------------------------------------

### Webhook action now supports batching[​](https://pubnub.com/docs/release-notes/2024/may#webhook-action-now-supports-batching "Direct link to Webhook action now supports batching")

**Type**: Enhancement

**Description**: The [Batching](https://pubnub.com/docs/serverless/events-and-actions/events#batching) feature in Events & Action lets you manage a large volume of events by sending them in a single request rather than sending each event individually. This feature is also available for the [Webhook action](https://pubnub.com/docs/serverless/events-and-actions/actions/create-webhook-action) type as of May.

![Batching feature](https://pubnub.com/assets/images/batching-e3cf9a2f9881bf32f6c8a0782ac4efff.png)

### (Un)enveloping[​](https://pubnub.com/docs/release-notes/2024/may#unenveloping "Direct link to (Un)enveloping")

**Type**: Enhancement

**Description**: You can now wrap the payload of every action in an [envelope](https://pubnub.com/docs/serverless/events-and-actions/events#envelope), i.e., choose whether the payload schema should contain detailed Events & Actions JSON metadata. It might be helpful in cases when you want to use metadata outside of the payload, like info on the channel where the payload was sent to or the listener that triggered it.

![Envelope feature](https://pubnub.com/assets/images/envelope-a629b278f2f637155ddfe6486c3441b5.png)

Illuminate 💡[​](https://pubnub.com/docs/release-notes/2024/may#illuminate- "Direct link to Illuminate 💡")
-----------------------------------------------------------------------------------------------------------

### Stacked bar charts[​](https://pubnub.com/docs/release-notes/2024/may#stacked-bar-charts "Direct link to Stacked bar charts")

**Type**: New feature

**Description**: In addition to the bar and line charts, Illuminate Dashboards now offer a new [stacked bar](https://pubnub.com/docs/illuminate/dashboards/basics#settings) type of chart that improves data readability when there are many dimensions and values on a single chart.

![Stacked bar chart](https://pubnub.com/assets/images/stacked-bar-chart-1c8ca3660f7fcba4c54d4e6b0c60c757.png)

### Variables[​](https://pubnub.com/docs/release-notes/2024/may#variables "Direct link to Variables")

**Type**: Enhancement

**Description**: When you create actions in Decisions (stating what you want to do with the collected metrics), you can add [variables](https://pubnub.com/docs/illuminate/decisions/basics#decision-structure) in the action configuration tables to control and dynamically change what they refer to. You can use variables more flexibly - either by referring to the predefined conditions (type `${)` and choosing from the list) or setting up new variables (`${variable}`) as you go. Variables are now available for most action fields, not only in actions' **Payload** or **Body**.

![Variables](https://pubnub.com/assets/images/variables-7d466ce2dfd4f14a521e2257ab92c582.png)

### Improved data mapping fields[​](https://pubnub.com/docs/release-notes/2024/may#improved-data-mapping-fields "Direct link to Improved data mapping fields")

**Type**: Enhancement

**Description**: When you create a Business Object and define measures (what data you want to track) or dimensions (to segment what you're tracking), you must map field names to the actual fields in your payload to let Illuminate know where this data should be looked for. Until now, you have had to manually enter the exact mapping of the specific payload field. As of May, Illuminate offers more user-friendly [drop-down menus](https://pubnub.com/docs/illuminate/business-objects/basics#data-mapping) to locate the exact Publish and App Context data location.

![JSON menu](https://pubnub.com/assets/images/json-menu-5f7606df253bb033f38a900b97f66626.png)

Other 🌟[​](https://pubnub.com/docs/release-notes/2024/may#other- "Direct link to Other 🌟")
--------------------------------------------------------------------------------------------

### New search and AI assistant[​](https://pubnub.com/docs/release-notes/2024/may#new-search-and-ai-assistant "Direct link to New search and AI assistant")

**Type**: New feature

**Description**: Last but definitely not least, we've swapped the Algolia search in our docs for the new combined search and AI assistant experience to make the PubNub learning adventure more accurate and interactive.

![Search and AI Assistant](https://pubnub.com/assets/images/search-88e1601c53cfce296c5b54947b3b32f5.gif)

Time to level up your coding game and make friends with our new AI assistant and search feature. We’ll refine it based on your feedback, so if something is missing, we'll make sure to update it. Happy coding! 🚀