|
|
@ -40,7 +40,7 @@ export class ChatService {
|
|
|
|
console.log("Getting chats by ID..")
|
|
|
|
console.log("Getting chats by ID..")
|
|
|
|
|
|
|
|
|
|
|
|
for(let chatId of pChatIDs) {
|
|
|
|
for(let chatId of pChatIDs) {
|
|
|
|
let url = 'https://greenvironment.net/graphql'
|
|
|
|
let url = environment.graphQLUrl
|
|
|
|
|
|
|
|
|
|
|
|
let headers = new Headers()
|
|
|
|
let headers = new Headers()
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
@ -54,7 +54,7 @@ export class ChatService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public createNewChat(pUserID: number) {
|
|
|
|
public createNewChat(pUserID: number) {
|
|
|
|
let url = 'https://greenvironment.net/graphql'
|
|
|
|
let url = environment.graphQLUrl
|
|
|
|
|
|
|
|
|
|
|
|
let headers = new Headers()
|
|
|
|
let headers = new Headers()
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
@ -63,7 +63,7 @@ export class ChatService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public requestAllChatPartners(): Array<FriendInfo> {
|
|
|
|
public requestAllChatPartners(): Array<FriendInfo> {
|
|
|
|
let url = 'https://greenvironment.net/graphql'
|
|
|
|
let url = environment.graphQLUrl
|
|
|
|
let chatPartners: Array<FriendInfo>
|
|
|
|
let chatPartners: Array<FriendInfo>
|
|
|
|
let temp
|
|
|
|
let temp
|
|
|
|
|
|
|
|
|
|
|
@ -91,7 +91,7 @@ export class ChatService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public sendMessage(pChatID: number, pContent: string) {
|
|
|
|
public sendMessage(pChatID: number, pContent: string) {
|
|
|
|
let url = 'https://greenvironment.net/graphql'
|
|
|
|
let url = environment.graphQLUrl
|
|
|
|
|
|
|
|
|
|
|
|
let headers = new Headers()
|
|
|
|
let headers = new Headers()
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
@ -101,7 +101,7 @@ export class ChatService {
|
|
|
|
|
|
|
|
|
|
|
|
public getMessages(pChatID): Array<Chatmessage> {
|
|
|
|
public getMessages(pChatID): Array<Chatmessage> {
|
|
|
|
let messages: Array<Chatmessage>
|
|
|
|
let messages: Array<Chatmessage>
|
|
|
|
let url = 'https://greenvironment.net/graphql'
|
|
|
|
let url = environment.graphQLUrl
|
|
|
|
|
|
|
|
|
|
|
|
let headers = new Headers()
|
|
|
|
let headers = new Headers()
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
|
headers.set('Content-Type', 'application/json')
|
|
|
|