This commit is contained in:
Peter Maquiran
2022-03-04 14:20:39 +01:00
parent f5880fec2a
commit c112080917
6 changed files with 205 additions and 89 deletions
@@ -17,6 +17,8 @@ import { ChangeProfileService } from '../change-profile.service';
import { UserSession } from 'src/app/models/user.model';
import { AuthService } from '../auth.service';
import { ChatStorageService } from './chat-storage.service'
import { ChatMethodsService } from './chat-methods.service'
@Injectable({
providedIn: 'root'
@@ -51,7 +53,8 @@ export class WsChatMethodsService {
private changeProfileService: ChangeProfileService,
private chatService: ChatService,
private authService: AuthService,
private ChatStorageService: ChatStorageService
private ChatStorageService: ChatStorageService,
private ChatMethodsService:ChatMethodsService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
@@ -288,7 +291,7 @@ export class WsChatMethodsService {
// create room
if(!this.roomExist(roomId)) {
let room:RoomService = new RoomService(this.WsChatService, new MessageService(this.storage, this.NfService, this.WsChatService, this.ChatStorageService), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService , this.ChatStorageService)
let room:RoomService = new RoomService(this.WsChatService, new MessageService(this.storage, this.NfService, this.WsChatService, this.ChatStorageService, this.ChatMethodsService), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService , this.ChatStorageService, this.ChatMethodsService)
room.setData(setData)
room.receiveMessage()
room.getAllUsers = this.getUsers