Skip to content

Custom data not accessible in notification activities #78

Description

@andrewmikhniuk

Problem

When creating reactions or comments with createNotificationActivity: true and passing custom data via the custom parameter, this custom data is not accessible/propagated to the resulting notification activities.

How I'm adding reactions/comments with custom data:

Adding a reaction:

feedController.addActivityReaction(
  activityId: activityData.id,
  request: AddReactionRequest(
    type: 'like',
    createNotificationActivity: true,
    custom: {
      'communityId': 123,
      'communityName': 'My Community',
    },
  ),
);

Adding a comment:

activityController.addComment(
  request: ActivityAddCommentRequest(
    activityId: activityId,
    comment: 'Hello!',
    createNotificationActivity: true,
    custom: {
      'communityId': 123,
      'communityName': 'My Community',
    },
  ),
);

Expected Behavior

The custom data passed to AddReactionRequest or ActivityAddCommentRequest should be accessible somewhere in the notification ActivityData object - either via:

  • activity.custom
  • activity.notificationContext?.trigger?.custom
  • activity.notificationContext?.reaction?.custom
  • Or some other clearly documented property

Actual Behavior

The custom data appears to not be exposed anywhere in the notification activity. There's no clear way (or documented way) to retrieve the custom metadata that was passed when creating the reaction/comment.

Questions

  1. Is the custom data supposed to be passed through to the notification activity?
  2. If yes, where should I look for it in the ActivityData object?
  3. If not, is this a feature request or a bug?

Environment

  • stream_feeds version: ^0.5.0
  • Flutter version: >=3.29.2
  • Dart SDK version: >=3.9.0 <4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendWaiting for backendenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions