DEV Community

Cover image for Documentation Release Notes - August 2024
PubNub Developer Relations for PubNub

Posted on

Documentation Release Notes - August 2024

This article was originally published at https://www.pubnub.com/docs/release-notes/2024/august

This month brings a bunch of new features and some updates to those released last month.

We've been busy improving our REST API to help prevent data clashes, rolling out new gaming SDKs for developers, and adding nifty tools for chat moderators in the BizOps Workspace.

Plus, we've expanded our Events & Actions with new event sources for better tracking of user and channel changes, and Illuminate now includes new data types that make it easier to calculate durations.

Read on for more details.

General πŸ› οΈ

Preventing concurrent object modifications (REST API)

Type: Improvement

We added the optional If-Match HTTP header to the App Context API to let you prevent concurrent modifications of the same User or Channel object.

You can add If-Match to the Set user metadata and Set channel metadata requests and set it to the value of the eTag field from a previous GET request response. If this value doesn't match the User object's current eTag value while making the request, the call fails to succeed.

curl -L -X PATCH 'https://ps.pndsn.com/v2/objects/sub-c-5a16361b-9ade-4c3b-8795-bd278c62cc41/uuids/app-context-user-02' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'If-Match: 029e975e076e10539bc51aadfc117552' \
--data-raw '{
  "name": "John Doe",
  "externalId": null,
  "profileUrl": null,
  "email": "jack@twitter.com"
}'

{
  "status": 412,
  "error": {
    "message": "User to update has been modified after it was read.",
Enter fullscreen mode Exit fullscreen mode
Availability

The If-Match/eTag combination is fully supported in the App Context User and Channel APIs, but it's currently not available in the membership and members' metadata APIs.

SDKs πŸ“¦

New gaming SDKs

Type: New Feature

This month was marked by a nod (three, to be precise) towards game developers as we released three brand new gaming SDKs:

These SDKs are meant to simplify gaming app creation and chat integration for games. The chat SDKs contain pre-built features like read receipts, user presence detection, and typing indicators that integrate seamlessly with your game’s UI.

We hope you'll like them!

Events & Actions ⚑

App Context event types

Type: Enhancement

We're not slowing down in extending the Events & Actions offering. Last month, we released new message action event types, and this month, we extended listeners even more.

Events & Actions listeners now support new App Context event sources that let you listen to all created, updated, and deleted events emitted whenever a User, Channel, or Membership object is modified.

User-related event types

These new event types can be used for various use cases in your apps, such as notifying users in real time when user roles, channels, or team memberships change.

BizOps Workspace 🏒

Reviewing reported messages

Type: New feature

Channel Monitor has a new feature that helps chat moderators review messages reported by other chat members as potentially offensive.

If your Chat SDK-based app lets users flag or report messages published on channels by other channel members, this complementary Channel Monitor feature will help you deal with such reported messages.

Thanks to a new UI option, you can conveniently open all messages reported on a given channel in one place and review them one by one.

Review reported messages

You can act on a reported message in a number of ways: mark it as reviewed, edit, or delete it. Alternatively, you can mute, ban, or watch the message author.

Reported messages drawer

Retention time

Flagged messages are visible on the report for their lifetime, which depends on the retention time you set in the Message Persistence on your app's keyset in the Admin Portal.

Illuminate πŸ’‘

New data types

Type: Enhancement

This month we launched two new data types in addition to Number and String released last month.

As of now, you can use Timestamp and Derived (Duration) to calculate duration in your metrics. Specify Timestamp to indicate UTC date and time and Derived (Duration) to calculate the difference between two timestamp data types within the same event.

Duration metrics

For example, using Timestamp and Derived (Duration), your app can determine the exact time each delivery takes. If you notice that average delivery times exceed the 20-minute target, you can refine delivery estimates, add drivers to high-delay routes, or tweak routes for quicker service, making your deliveries more reliable and responsive to customer needs.

Top comments (0)