* Removes the activity by activityId or foreignId * @link https://getstream.io/activity-feeds/docs/node/adding_activities/?language=js#removing-activities * @method removeActivity * @memberof StreamFeed.prototype * @param {string} activityOrActivityId Identifier of activity to remove
(activityOrActivityId: string | { foreignId: string } | { foreign_id: string })
| 309 | * @example feed.removeActivity({'foreign_id': foreignId}); |
| 310 | */ |
| 311 | removeActivity(activityOrActivityId: string | { foreignId: string } | { foreign_id: string }) { |
| 312 | const foreign_id = |
| 313 | (activityOrActivityId as { foreignId?: string }).foreignId || |
| 314 | (activityOrActivityId as { foreign_id?: string }).foreign_id; |
| 315 | |
| 316 | return this.client.delete<APIResponse & { removed: string }>({ |
| 317 | url: `feed/${this.feedUrl}/${foreign_id || activityOrActivityId}/`, |
| 318 | qs: foreign_id ? { foreign_id: '1' } : {}, |
| 319 | token: this.token, |
| 320 | }); |
| 321 | } |
| 322 | |
| 323 | /** |
| 324 | * Adds the given activities to the feed |
no test coverage detected