mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
merge
This commit is contained in:
@@ -18,7 +18,6 @@ import { ChatMethodsService } from './chat-methods.service';
|
||||
import { AESEncrypt } from '../aesencrypt.service'
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { NetworkServiceService} from 'src/app/services/network-service.service';
|
||||
import { JsonStore } from '../jsonStore.service';
|
||||
import { ViewedMessageService } from './viewed-message.service'
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -97,7 +96,7 @@ export class ChatSystemService {
|
||||
}
|
||||
|
||||
loadChat() {
|
||||
if(SessionStore.user.ChatData) {
|
||||
if(SessionStore.user?.ChatData?.data) {
|
||||
this.ReLoadChat()
|
||||
}
|
||||
}
|
||||
@@ -185,14 +184,18 @@ export class ChatSystemService {
|
||||
async getAllRooms () {
|
||||
this.loadingWholeList = true
|
||||
var rooms;
|
||||
try {
|
||||
rooms = await this.RochetChatConnectorService.getRooms();
|
||||
} catch (error) {
|
||||
console.error('chatgetrooms',error)
|
||||
}
|
||||
|
||||
if(this.RochetChatConnectorService.isLogin) {
|
||||
try {
|
||||
await this.storage.remove('Rooms');
|
||||
} catch(e) {}
|
||||
rooms = await this.RochetChatConnectorService.getRooms();
|
||||
} catch (error) {
|
||||
this.loadingWholeList = false
|
||||
console.error('chatgetrooms',error)
|
||||
}
|
||||
try {
|
||||
await this.storage.remove('Rooms');
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
let index = 0
|
||||
|
||||
@@ -317,8 +320,12 @@ export class ChatSystemService {
|
||||
this.defaultSubtribe(id)
|
||||
}
|
||||
|
||||
this.RochetChatConnectorService.streamNotifyLogged().then((subscription=>{
|
||||
|
||||
this.RochetChatConnectorService.streamNotifyLogged().then((subscription => {
|
||||
console.log(subscription)
|
||||
}))
|
||||
|
||||
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => {
|
||||
console.log(subscription)
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -407,7 +414,7 @@ export class ChatSystemService {
|
||||
|
||||
let roomId = this.getRoomId(roomData);
|
||||
|
||||
if (setData.name != 'Rocket Cat') {
|
||||
if (setData.name != 'Rocket Cat' && setData.name != 'general' ) {
|
||||
// create room
|
||||
if(!this.roomExist(roomId)) {
|
||||
let room:RoomService = new RoomService(this.RochetChatConnectorService, new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this, this.ViewedMessageService)
|
||||
@@ -615,7 +622,7 @@ export class ChatSystemService {
|
||||
return !roomData.fname
|
||||
}
|
||||
|
||||
getUsers = () =>{
|
||||
getUsers = () => {
|
||||
return this.users
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user