This commit is contained in:
Peter Maquiran
2022-04-18 15:12:27 +01:00
parent 8c704ca898
commit 7de80902cf
14 changed files with 41 additions and 24 deletions
@@ -7,6 +7,7 @@ import { GroupMessagesPage } from '../../group-messages/group-messages.page';
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 { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-contacts',
@@ -24,6 +25,7 @@ export class ContactsPage implements OnInit {
textSearch:string;
room:any;
dm:any;
sessionStore = SessionStore
constructor(
private modalController: ModalController,
@@ -55,7 +57,7 @@ export class ContactsPage implements OnInit {
};
this.chatService.getAllUsers().subscribe((res:any)=>{
console.log(res.users);
this.contacts = res.users.filter(data => data.username != this.loggedUser.me.username);
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.RochetChatUser);
this.users = this.contacts.sort((a,b) => {
if(a.name < b.name){
return -1;