Documentation Release Notes - June 2024
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 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:
{
"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 option for customers on paid pricing plans, 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.
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 for details.
App Context configuration dependencyβ
Type: Improvement
We updated the docs on App Context configuration options to include information on a critical dependency.
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 option, which is turned on by default when you enable App Context on your app's keyset in the Admin Portal.
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 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 and move them to the 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 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 to an external service.
Insights πβ
User duration & device metrics in REST API docsβ
Type: Improvement
Last month, 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 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).
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.
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 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.
We hope you like its new look and feel!