mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
improvements
This commit is contained in:
@@ -24,6 +24,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
message:any;
|
||||
leaveStatus:any;
|
||||
messages:any;
|
||||
allUsers:any[] = [];
|
||||
|
||||
|
||||
room:any = new Array();
|
||||
@@ -72,6 +73,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
this.serverLongPull();
|
||||
console.log(this.roomId);
|
||||
this.setStatus('online');
|
||||
this.getChatMembers();
|
||||
}
|
||||
|
||||
setStatus(status:string){
|
||||
@@ -116,6 +118,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
window.removeEventListener('scroll', this.scrollChangeCallback, true);
|
||||
}
|
||||
|
||||
async getChatMembers(){
|
||||
//return await this.chatService.getMembers(roomId).toPromise();
|
||||
this.chatService.getAllUsers().subscribe(res=> {
|
||||
console.log(res);
|
||||
|
||||
this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
|
||||
console.log(this.allUsers);
|
||||
});
|
||||
}
|
||||
|
||||
openGroupContactsPage(){
|
||||
this.openGroupContacts.emit(this.roomId);
|
||||
}
|
||||
@@ -210,7 +222,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": this.roomId, "msg": this.message
|
||||
"rid": this.roomId,
|
||||
"msg": this.message,
|
||||
"attachments": [{
|
||||
"color": "#ff0000",
|
||||
"text": "Yay for gruggy!",
|
||||
"title": "Attachment Example",
|
||||
"title_link": "https://youtube.com",
|
||||
"title_link_download": false,
|
||||
"image_url": "http://res.guggy.com/logo_128.png",
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user