mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add refesh token
This commit is contained in:
@@ -234,6 +234,7 @@ export class ChatPage implements OnInit {
|
|||||||
}
|
}
|
||||||
openMessagesPage(rid) {
|
openMessagesPage(rid) {
|
||||||
|
|
||||||
|
this.chatService.refreshtoken();
|
||||||
this.roomId = rid;
|
this.roomId = rid;
|
||||||
|
|
||||||
if (window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
@@ -281,6 +282,7 @@ export class ChatPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openGroupMessagesPage(rid) {
|
openGroupMessagesPage(rid) {
|
||||||
|
this.chatService.refreshtoken();
|
||||||
|
|
||||||
this.roomId = rid;
|
this.roomId = rid;
|
||||||
if (window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ export class RoomService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sortRoomList = () => {}
|
sortRoomList = () => {}
|
||||||
uploadAttachment = (formData) => {}
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public WsChatService: WsChatService,
|
public WsChatService: WsChatService,
|
||||||
@@ -622,7 +621,7 @@ export class RoomService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private typingWatch() {
|
private typingWatch() {
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
const now = new Date().getTime()
|
const now = new Date().getTime()
|
||||||
|
|
||||||
if((now - this.lastTimeType) >= 2888) {
|
if((now - this.lastTimeType) >= 2888) {
|
||||||
@@ -631,8 +630,6 @@ export class RoomService {
|
|||||||
this.isTyping = false
|
this.isTyping = false
|
||||||
this.WsChatService.sendStreamNotifyRoom(this.id, SessionStore.user.UserName, 'typing', this.isTyping)
|
this.WsChatService.sendStreamNotifyRoom(this.id, SessionStore.user.UserName, 'typing', this.isTyping)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, 3000)
|
}, 3000)
|
||||||
|
|||||||
@@ -144,17 +144,14 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
}
|
}
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
|
|
||||||
|
this.chatService.refreshtoken();
|
||||||
this.getRoomInfo();
|
this.getRoomInfo();
|
||||||
//this.scrollToBottom();
|
|
||||||
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
|
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
|
||||||
//
|
//
|
||||||
this.wsChatMethodsService.openRoom(this.roomId)
|
this.wsChatMethodsService.openRoom(this.roomId)
|
||||||
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||||
this.groupNameFormart = this.wsChatMethodsService.getGroupRoom(this.roomId).name.split('-').join(' ')
|
this.groupNameFormart = this.wsChatMethodsService.getGroupRoom(this.roomId).name.split('-').join(' ')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.showAvatar = false
|
this.showAvatar = false
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -130,6 +130,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
|
|
||||||
|
this.chatService.refreshtoken();
|
||||||
this.wsChatMethodsService.getAllRooms();
|
this.wsChatMethodsService.getAllRooms();
|
||||||
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
|
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
|
||||||
|
|
||||||
@@ -137,10 +139,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
|
|
||||||
this.wsChatMethodsService.openRoom(this.roomId)
|
this.wsChatMethodsService.openRoom(this.roomId)
|
||||||
|
|
||||||
this.wsChatMethodsService.getDmRoom(this.roomId).uploadAttachment = async (formData) => {
|
|
||||||
let guid: any = await this.AttachmentsService.uploadFile(formData).toPromise()
|
|
||||||
}
|
|
||||||
|
|
||||||
this.showAvatar = false
|
this.showAvatar = false
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -531,11 +529,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
//
|
//
|
||||||
|
|
||||||
//this.showLoader = true;
|
//this.showLoader = true;
|
||||||
this.chatService.getMembers(this.roomId).subscribe(res => {
|
// this.chatService.getMembers(this.roomId).subscribe(res => {
|
||||||
this.members = res['members'];
|
// this.members = res['members'];
|
||||||
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
|
// this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
|
||||||
this.showLoader = false;
|
// this.showLoader = false;
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
async openMessagesOptions(ev: any) {
|
async openMessagesOptions(ev: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user