Skip to content

markAllAsSeen is not respecting triggerData filters although the api allows it #1041

Description

@guillecom

Description:
I think there is a bug where the markAllAsSeen and read are not respecting the options of trigger_data tset for the feed.
I believe the bug is here in src/clients/feed/feed.ts

private async makeBulkStatusUpdate(
    status: BulkUpdateMessagesInChannelProperties["status"],
  ) {
    // The base scope for the call should take into account all of the options currently
    // set on the feed, as well as being scoped for the current user. We do this so that
    // we ONLY make changes to the messages that are currently in view on this feed, and not
    // all messages that exist.
    const options = {
      user_ids: [this.knock.userId!],
      engagement_status:
        this.defaultOptions.status !== "all"
          ? this.defaultOptions.status
          : undefined,
      archived: this.defaultOptions.archived,
      has_tenant: this.defaultOptions.has_tenant,
      tenants: this.defaultOptions.tenant
        ? [this.defaultOptions.tenant]
        : undefined,
    };

    return await this.knock.messages.bulkUpdateAllStatusesInChannel({
      channelId: this.feedId,
      `status,`
      options,
    });
  }

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions