rename files

This commit is contained in:
Peter Maquiran
2022-09-30 15:13:36 +01:00
parent 64ad7bbc7f
commit 12cf5831a8
36 changed files with 256 additions and 315 deletions
@@ -41,7 +41,7 @@
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
</div>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getGroupRoom(roomId).messages; let last = last">
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of ChatSystemService.getGroupRoom(roomId).messages; let last = last">
<div class="message-item incoming-{{msg.u.username!=sessionStore.user.UserName}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''" >
<div class="message-item-options d-flex justify-content-end">
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
@@ -240,14 +240,14 @@
<ion-footer>
<div class="typing" *ngIf="wsChatMethodsService.getGroupRoom(roomId).otherUserType == true">
<div class="typing" *ngIf="ChatSystemService.getGroupRoom(roomId).otherUserType == true">
<ngx-letters-avatar *ngIf="showAvatar"
[avatarName]= "wsChatMethodsService.getGroupRoom(roomId).name"
[avatarName]= "ChatSystemService.getGroupRoom(roomId).name"
[width]="30"
[circular]="true"
fontFamily="Roboto"></ngx-letters-avatar>
{{ wsChatMethodsService.getGroupRoom(roomId).userThatIsTyping }} está a escrever...
{{ ChatSystemService.getGroupRoom(roomId).userThatIsTyping }} está a escrever...
</div>
<div class="width-100 pl-20 pr-20">
@@ -286,7 +286,7 @@
<div class="width-100">
<div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getGroupRoom(roomId).message" (ionChange)="wsChatMethodsService.getGroupRoom(roomId).sendTyping()"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="ChatSystemService.getGroupRoom(roomId).message" (ionChange)="ChatSystemService.getGroupRoom(roomId).sendTyping()"></ion-textarea>
</div>
<div *ngIf="recording" class="d-flex align-items-center justify-content-center">
<button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center">
@@ -296,15 +296,15 @@
</div>
<div class="btn-send">
<button #recordbtn *ngIf="!wsChatMethodsService.getGroupRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<button #recordbtn *ngIf="!ChatSystemService.getGroupRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon>
</button>
<button *ngIf="wsChatMethodsService.getGroupRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<button *ngIf="ChatSystemService.getGroupRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
<button *ngIf="!wsChatMethodsService.getGroupRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<button *ngIf="!ChatSystemService.getGroupRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
@@ -19,7 +19,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { ThemeService } from 'src/app/services/theme.service'
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { Storage } from '@ionic/storage';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
@@ -106,7 +106,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
groupNameFormart = "";
constructor(
public wsChatMethodsService: WsChatMethodsService,
public ChatSystemService: ChatSystemService,
private modalController: ModalController,
public popoverController: PopoverController,
private chatService: ChatService,
@@ -145,11 +145,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
ngOnChanges(changes: SimpleChanges): void {
this.getRoomInfo();
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
//
this.wsChatMethodsService.openRoom(this.roomId)
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.groupNameFormart = this.wsChatMethodsService.getGroupRoom(this.roomId).name.split('-').join(' ')
this.ChatSystemService.openRoom(this.roomId)
this.ChatSystemService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
this.showAvatar = false
@@ -404,8 +404,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
async getRoomInfo() {
if(this.wsChatMethodsService.getGroupRoom(this.roomId)) {
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
if(this.ChatSystemService.getGroupRoom(this.roomId)) {
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
}
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
@@ -448,11 +448,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
// });
// }
this.members = this.wsChatMethodsService.getGroupRoom(this.roomId).members
this.members = this.ChatSystemService.getGroupRoom(this.roomId).members
}
sendMessage() {
this.wsChatMethodsService.getGroupRoom(this.roomId).send({})
this.ChatSystemService.getGroupRoom(this.roomId).send({})
}
base64toBlob(base64Data, contentType) {
@@ -497,7 +497,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({
this.ChatSystemService.getGroupRoom(roomId).send({
file: {
"type": "application/audio",
"msDuration": audioFile.value.msDuration,
@@ -516,7 +516,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
}
deleteMessage(msgId: string) {
const room = this.wsChatMethodsService.getGroupRoom(this.roomId)
const room = this.ChatSystemService.getGroupRoom(this.roomId)
this.alertService.confirmDeleteMessage(msgId, room);
}
@@ -577,7 +577,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
this.getRoomInfo();
this.closeAllDesktopComponents.emit();
this.showEmptyContainer.emit();
this.wsChatMethodsService.hidingRoom(this.roomId);
this.ChatSystemService.hidingRoom(this.roomId);
}
else if (res.data == 'delete') {
this.closeAllDesktopComponents.emit();
@@ -770,7 +770,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({
this.ChatSystemService.getGroupRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
@@ -799,7 +799,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({
this.ChatSystemService.getGroupRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -840,7 +840,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
if (data.selected) {
this.wsChatMethodsService.getGroupRoom(roomId).send({
this.ChatSystemService.getGroupRoom(roomId).send({
file: {
"name": res.data.selected.Assunto,
"type": "application/webtrix",
@@ -886,7 +886,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({
this.ChatSystemService.getGroupRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -919,7 +919,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getGroupRoom(roomId).send({
this.ChatSystemService.getGroupRoom(roomId).send({
file: {
"type": file.type,
"guid": '',
@@ -29,7 +29,7 @@
<div class="main-content">
<ion-virtual-scroll [items]="WsChatMethodsService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
<ion-virtual-scroll [items]="ChatSystemService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
<div class="item-divider" *virtualHeader="let header">
<ion-label>{{header}}</ion-label>
@@ -5,7 +5,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { MessagesPage } from '../messages.page';
import { ThemeService } from 'src/app/services/theme.service'
import { WsChatMethodsService} from 'src/app/services/chat/ws-chat-methods.service'
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { SessionStore } from 'src/app/store/session.service';
@Component({
@@ -34,7 +34,7 @@ export class ContactsPage implements OnInit {
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService,
public WsChatMethodsService: WsChatMethodsService
public ChatSystemService: ChatSystemService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.textSearch="";
@@ -124,7 +124,7 @@ export class ContactsPage implements OnInit {
this.room = res['room'];
this.openMessagesModal(this.room._id);
this.WsChatMethodsService.getAllRooms()
this.ChatSystemService.getAllRooms()
});
}
@@ -3,7 +3,7 @@
<div class="main-header">
<div class="header-top">
<div class="middle">
<ion-label class="title">{{ this.wsChatMethodsService.getDmRoom(this.roomId).name }}</ion-label>
<ion-label class="title">{{ this.ChatSystemService.getDmRoom(this.roomId).name }}</ion-label>
<button (click)="ChatMessageDebuggingPage()">Dev</button>
<!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> -->
</div>
@@ -38,7 +38,7 @@
<ion-list>
<div class="messages-list-item-wrapper container-width-100"
*ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).messages; index as i; let last = last">
*ngFor="let msg of ChatSystemService.getDmRoom(roomId).messages; index as i; let last = last">
<div class='message-item incoming-{{msg.u.username!=sessionStore.user.UserName}} max-width-45' *ngIf="msg.msg !=''">
<div class="message-item-options d-flex justify-content-end">
@@ -218,11 +218,11 @@
</ion-content>
<ion-footer (click)="wsChatMethodsService.getDmRoom(roomId).sendReadMessage()">
<ion-footer (click)="ChatSystemService.getDmRoom(roomId).sendReadMessage()">
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true" >
<div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true" >
<ngx-letters-avatar *ngIf="showAvatar"
[avatarName]= "wsChatMethodsService.getDmRoom(roomId).name"
[avatarName]= "ChatSystemService.getDmRoom(roomId).name"
[width]="30"
[circular]="true"
fontFamily="Roboto"></ngx-letters-avatar>
@@ -268,7 +268,7 @@
<div class="width-100">
<div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea *ngIf="allowTyping" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
<ion-textarea *ngIf="allowTyping" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="ChatSystemService.getDmRoom(roomId).message" (ionChange)="ChatSystemService.getDmRoom(roomId).sendTyping()"></ion-textarea>
</div>
<div *ngIf="recording" class="d-flex align-items-center justify-content-center">
<button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center">
@@ -278,16 +278,16 @@
</div>
<div>
<button #recordbtn *ngIf="!wsChatMethodsService.getDmRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<button #recordbtn *ngIf="!ChatSystemService.getDmRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon>
<!-- <ion-icon *ngIf="audioPermissionStatus != 'granted' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio-disable.svg"></ion-icon> -->
</button>
<button *ngIf="wsChatMethodsService.getDmRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<button *ngIf="ChatSystemService.getDmRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
<button *ngIf="!wsChatMethodsService.getDmRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<button *ngIf="!ChatSystemService.getDmRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
+20 -20
View File
@@ -15,8 +15,8 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { ThemeService } from 'src/app/services/theme.service'
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { Storage } from '@ionic/storage';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service'
import { WsChatService } from 'src/app/services/chat/ws-chat.service'
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'
import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { CameraService } from 'src/app/services/camera.service';
@@ -116,8 +116,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private gestureController: GestureController,
public ThemeService: ThemeService,
private storage: Storage,
public wsChatMethodsService: WsChatMethodsService,
public WsChatService: WsChatService,
public ChatSystemService: ChatSystemService,
public RochetChatConnectorService: RochetChatConnectorService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private sanitiser: DomSanitizer,
@@ -131,12 +131,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
ngOnChanges(changes: SimpleChanges): void {
this.wsChatMethodsService.getAllRooms();
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
this.ChatSystemService.getAllRooms();
this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.wsChatMethodsService.openRoom(this.roomId)
this.ChatSystemService.openRoom(this.roomId)
this.showAvatar = false
@@ -176,7 +176,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
ngOnInit() {
this.wsChatMethodsService.getAllRooms();
this.ChatSystemService.getAllRooms();
this.chatService.refreshtoken();
this.scrollToBottom();
this.getChatMembers();
@@ -406,7 +406,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
sendMessage() {
this.wsChatMethodsService.getDmRoom(this.roomId).send({})
this.ChatSystemService.getDmRoom(this.roomId).send({})
}
@@ -430,7 +430,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/audio",
"msDuration": audioFile.value.msDuration,
@@ -450,7 +450,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
deleteMessage(msgId: string, msg: MessageService) {
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
this.ChatSystemService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
}
base64toBlob(base64Data, contentType) {
@@ -534,8 +534,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
// this.showLoader = false;
// });
this.members = this.wsChatMethodsService.getDmRoom(this.roomId).members
this.dmUsers = this.wsChatMethodsService.getDmRoom(this.roomId).membersExcludeMe
this.members = this.ChatSystemService.getDmRoom(this.roomId).members
this.dmUsers = this.ChatSystemService.getDmRoom(this.roomId).membersExcludeMe
}
async openMessagesOptions(ev: any) {
@@ -669,7 +669,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
@@ -702,7 +702,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -744,7 +744,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
if (data.selected) {
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"name": res.data.selected.Assunto,
"type": "application/webtrix",
@@ -787,7 +787,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -821,7 +821,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": file.type,
"guid": '',
@@ -1134,7 +1134,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async getRoomInfo() {
// this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
// this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
// console.log('ROOM',room)
this.room = room['room'];
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angu
import { NavigationStart, Router } from '@angular/router';
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
import { AuthService } from 'src/app/services/auth.service';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { DataService } from 'src/app/services/data.service';
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
import { SessionStore } from 'src/app/store/session.service';
@@ -39,7 +39,7 @@ export class NewGroupPage implements OnInit{
private modalController: ModalController,
private dataService:DataService,
private router: Router,
public wsChatMethodsService: WsChatMethodsService,
public ChatSystemService: ChatSystemService,
private authService: AuthService,
private toastService: ToastService,
public ThemeService: ThemeService
@@ -90,10 +90,10 @@ export class NewGroupPage implements OnInit{
let customFields = {
"countDownDate":this.thedate
}
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
}
else {
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
res = await this.ChatSystemService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
}
@@ -104,9 +104,9 @@ export class NewGroupPage implements OnInit{
if(res?.result?.rid) {
this.addGroupMessage.emit(res.result.rid);
await this.wsChatMethodsService.getAllRooms();
await this.ChatSystemService.getAllRooms();
if(!this.wsChatMethodsService.getGroupRoom(res.result.rid)) {
if(!this.ChatSystemService.getGroupRoom(res.result.rid)) {
this.createGroupWithAttachmentsCath(res)
} else {
setTimeout(()=> {
@@ -127,7 +127,7 @@ export class NewGroupPage implements OnInit{
}
createGroupWithAttachmentsCath(res: any) {
if(!this.wsChatMethodsService.getGroupRoom(res.result.rid)) {
if(!this.ChatSystemService.getGroupRoom(res.result.rid)) {
setTimeout(()=>{
this.createGroupWithAttachmentsCath(res)
}, 1500)
@@ -137,10 +137,10 @@ export class NewGroupPage implements OnInit{
}
createGroupWithAttachments(res: any) {
this.wsChatMethodsService.getGroupRoom(res.result.rid).hasLoadHistory = true;
this.ChatSystemService.getGroupRoom(res.result.rid).hasLoadHistory = true;
this.documents.forEach(element => {
this.wsChatMethodsService.getGroupRoom(res.result.rid).send({
this.ChatSystemService.getGroupRoom(res.result.rid).send({
file: {
"name": element.Assunto,
"type": "application/webtrix",