Skip to content

Commit af54040

Browse files
committed
add api for feed item discussion and speaker resource discussion
1 parent 5c30848 commit af54040

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

projects/commudle-admin/src/app/services/discussions.service.ts

+17
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@ export class DiscussionsService {
6666
);
6767
}
6868

69+
pGetOrCreateForSpeakerResourceChat(speakerResourceId): Observable<IDiscussion> {
70+
const params = new HttpParams().set('speaker_resource_id', speakerResourceId);
71+
return this.http.get<IDiscussion>(
72+
this.apiRoutesService.getRoute(API_ROUTES.DISCUSSIONS.PUBLIC_GET_OR_CREATE_FOR_SPEAKER_RESOURCE_CHAT),
73+
{ params }
74+
);
75+
}
76+
77+
78+
pGetOrCreateForFeedItemChat(feedItemId): Observable<IDiscussion> {
79+
const params = new HttpParams().set('feed_item_id', feedItemId);
80+
return this.http.get<IDiscussion>(
81+
this.apiRoutesService.getRoute(API_ROUTES.DISCUSSIONS.PUBLIC_GET_OR_CREATE_FOR_FEED_ITEM_CHAT),
82+
{ params }
83+
);
84+
}
85+
6986

7087
pGetOrCreateForCommunityChannel(communityChannelId): Observable<IDiscussion> {
7188
const params = new HttpParams().set('community_channel_id', communityChannelId);

projects/shared-services/api-routes.constants.ts

+2
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ export const API_ROUTES = {
331331
PUBLIC_GET_OR_CREATE_FOR_EVENT_CHAT: 'api/v2/discussions/public_get_or_create_for_event_chat',
332332
PUBLIC_GET_OR_CREATE_FOR_COMMUNITY_BUILD_CHAT: 'api/v2/discussions/public_get_or_create_for_community_build_chat',
333333
PUBLIC_GET_OR_CREATE_FOR_LAB_CHAT: 'api/v2/discussions/public_get_or_create_for_lab_chat',
334+
PUBLIC_GET_OR_CREATE_FOR_SPEAKER_RESOURCE_CHAT: 'api/v2/discussions/public_get_or_create_for_speaker_resource_chat',
335+
PUBLIC_GET_OR_CREATE_FOR_FEED_ITEM_CHAT: 'api/v2/discussions/public_get_or_create_for_feed_item_chat',
334336
PUBLIC_GET_OR_CREATE_FOR_COMMUNITY_CHANNEL_CHAT: 'api/v2/discussions/public_get_or_create_for_community_channel_chat',
335337
COMMUNITY_CHANNEL: {
336338
NEW_ATTACHMENT_MESSAGE: 'api/v2/discussions/community_channel/new_attachment_message',

0 commit comments

Comments
 (0)