mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Bug solved creating group on chat module
This commit is contained in:
@@ -8,6 +8,7 @@ import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-group',
|
||||
@@ -62,6 +63,7 @@ export class NewGroupPage implements OnInit {
|
||||
}
|
||||
|
||||
async createGroup(){
|
||||
console.log('NEW GROUP', SessionStore.user.RochetChatUser)
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
//Take out all special characters in string
|
||||
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
@@ -73,11 +75,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user