mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
save
This commit is contained in:
@@ -56,9 +56,7 @@ export class ChatService {
|
||||
|
||||
});
|
||||
} */
|
||||
getAllDirectMessages(){
|
||||
return this.http.get(environment.apiChatUrl+'im.list', this.options);
|
||||
}
|
||||
|
||||
getAllChannels(){
|
||||
return this.http.get(environment.apiChatUrl+'channels.list', this.options);
|
||||
}
|
||||
@@ -69,6 +67,13 @@ export class ChatService {
|
||||
getAllRooms(){
|
||||
return this.http.get(environment.apiChatUrl+'rooms.get', this.options);
|
||||
}
|
||||
customsRooms(params:any){
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(environment.apiChatUrl+'rooms.get', opts);
|
||||
}
|
||||
getAllPrivateGroups(){
|
||||
return this.http.get(environment.apiChatUrl+'groups.list', this.options);
|
||||
}
|
||||
@@ -96,7 +101,9 @@ export class ChatService {
|
||||
loadJoinedRooms(){
|
||||
return this.http.get(environment.apiChatUrl+'im.list', this.options);
|
||||
}
|
||||
|
||||
getAllDirectMessages(){
|
||||
return this.http.get(environment.apiChatUrl+'im.list', this.options);
|
||||
}
|
||||
//Load messages from roomId
|
||||
getRoomMessages(roomId:any){
|
||||
|
||||
@@ -147,5 +154,79 @@ export class ChatService {
|
||||
}
|
||||
return this.http.get(environment.apiChatUrl+'im.messages', opts);
|
||||
}
|
||||
|
||||
/* GROUPS */
|
||||
addGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.create', body, this.options);
|
||||
}
|
||||
getGroupMembers(roomId:string){
|
||||
let params = new HttpParams();
|
||||
let url=environment.apiChatUrl+'groups.members';
|
||||
params = params.set("roomId", roomId);
|
||||
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(url, opts);
|
||||
}
|
||||
getChannelMembers(roomId:string){
|
||||
let params = new HttpParams();
|
||||
let url=environment.apiChatUrl+'channels.members';
|
||||
params = params.set("roomId", roomId);
|
||||
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(url, opts);
|
||||
}
|
||||
/* GROUP MESSAGES */
|
||||
getPrivateGroupMessages(roomId:any){
|
||||
|
||||
let params = new HttpParams();
|
||||
params = params.set("roomId", roomId);
|
||||
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(environment.apiChatUrl+'groups.history', opts);
|
||||
}
|
||||
getPublicGroupMessages(roomId:any){
|
||||
let params = new HttpParams();
|
||||
params = params.set("roomId", roomId);
|
||||
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(environment.apiChatUrl+'channels.history', opts);
|
||||
}
|
||||
closeGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.close', body, this.options);
|
||||
}
|
||||
closeChannel(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'channels.close', body, this.options);
|
||||
}
|
||||
deleteGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.delete', body, this.options);
|
||||
}
|
||||
deleteChannel(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'channels.delete', body, this.options);
|
||||
}
|
||||
addUserToGroup(body:any){
|
||||
return this.http.post(environment.apiChatUrl+'groups.invite', body, this.options);
|
||||
}
|
||||
getGroupInfo(roomId:any){
|
||||
let params = new HttpParams();
|
||||
params = params.set("roomId", roomId);
|
||||
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(environment.apiChatUrl+'groups.info', opts);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user