mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix
This commit is contained in:
@@ -7,6 +7,7 @@ import { ChatService } from 'src/app/services/chat.service';
|
||||
import { NewGroupPage } from '../../new-group/new-group.page';
|
||||
import { GroupMessagesPage } from '../group-messages.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-contacts',
|
||||
@@ -31,6 +32,7 @@ export class GroupContactsPage implements OnInit {
|
||||
isGroupCreated:boolean;
|
||||
groupName:string;
|
||||
selectedUserList:any;
|
||||
sessionStore = SessionStore
|
||||
|
||||
@Input() roomId:string;
|
||||
@Output() openGroupMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -156,7 +158,7 @@ export class GroupContactsPage implements OnInit {
|
||||
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
|
||||
}
|
||||
else{
|
||||
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) => {
|
||||
@@ -186,7 +188,7 @@ export class GroupContactsPage implements OnInit {
|
||||
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
|
||||
}
|
||||
else{
|
||||
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) => {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getGroupRoom(roomId).messages; let last = last">
|
||||
<div class="message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''" >
|
||||
<div class="message-item incoming-{{msg.u.username!=sessionStore.user.RochetChatUser}} 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>
|
||||
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="msg.file">
|
||||
<div class="message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.file.type != 'application/meeting'" >
|
||||
<div class="message-item incoming-{{msg.u.username!=sessionStore.user.RochetChatUser}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.file.type != 'application/meeting'" >
|
||||
<div *ngIf="msg.file.type != 'application/meeting'">
|
||||
<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>
|
||||
|
||||
@@ -39,6 +39,7 @@ import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { AlertController, NavParams } from '@ionic/angular';
|
||||
import { File } from '@awesome-cordova-plugins/file/ngx';
|
||||
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
|
||||
/*
|
||||
@@ -104,6 +105,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
duration = 0;
|
||||
|
||||
audioPermissionStatus: 'granted'| 'denied' | 'prompt' | null = null
|
||||
sessionStore = SessionStore
|
||||
|
||||
constructor(
|
||||
public wsChatMethodsService: WsChatMethodsService,
|
||||
|
||||
@@ -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
|
||||
|
||||
@Output() openMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
@@ -71,8 +73,8 @@ 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.loggedUser.me.username);
|
||||
//this.contacts = res.users.filter(data => data.username != this.sessionStore.user.RochetChatUser);
|
||||
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;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="messages" #scrollMe>
|
||||
<div class="messages-list-item-wrapper container-width-100"
|
||||
*ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).messages; index as i; let last = last">
|
||||
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.msg !=''">
|
||||
<div class='message-item incoming-{{msg.u.username!=sessionStore.user.RochetChatUser}} max-width-45' *ngIf="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>
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="msg.file && msg.delate == false">
|
||||
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'
|
||||
<div class='message-item incoming-{{msg.u.username!=sessionStore.user.RochetChatUser}} max-width-45'
|
||||
*ngIf="msg.file.type != 'application/meeting'">
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
||||
|
||||
@@ -38,6 +38,7 @@ import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { AlertController, Platform, NavParams } from '@ionic/angular';
|
||||
import { File } from '@awesome-cordova-plugins/file/ngx';
|
||||
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
@@ -95,6 +96,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
duration = 0;
|
||||
|
||||
audioPermissionStatus: 'granted'| 'denied' | 'prompt' | null = null
|
||||
sessionStore = SessionStore
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
@@ -543,7 +545,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
//this.showLoader = true;
|
||||
this.chatService.getMembers(this.roomId).subscribe(res => {
|
||||
this.members = res['members'];
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.loggedUser.me.username)
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.RochetChatUser)
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user