Bug solved creating group on chat module

This commit is contained in:
Eudes Inácio
2022-04-24 19:45:20 +01:00
parent 8572ad0929
commit 78a6babe23
5 changed files with 14 additions and 9 deletions
@@ -8,6 +8,7 @@ import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.serv
import { DataService } from 'src/app/services/data.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
import { SessionStore } from 'src/app/store/session.service';
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
@Component({
@@ -92,6 +93,7 @@ export class NewGroupPage implements OnInit{
}
async createGroup(){
console.log('NEW GROUP', this.loggedUserChat)
let name = this.groupName.split(' ').join('-');
//Take out all special characters in string
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
@@ -103,11 +105,11 @@ export class NewGroupPage implements OnInit{
let customFields = {
"countDownDate":this.thedate
}
res = await this.wsChatMethodsService.createPrivateRoom(name, this.loggedUserChat.me.username, customFields);
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.RochetChatUser, customFields);
console.log(res);
}
else{
res = await this.wsChatMethodsService.createPrivateRoom(name, this.loggedUserChat.me.username, customFields);
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.RochetChatUser, customFields);
console.log(res);
}