This commit is contained in:
tiago.kayaya
2022-01-13 13:45:04 +01:00
parent e2e3067bf5
commit f54beff851
5 changed files with 6 additions and 9 deletions
-2
View File
@@ -8,7 +8,6 @@ import { environment } from 'src/environments/environment';
import { Storage } from '@ionic/storage';
import { Message } from 'src/app/models/message.model';
import { Observable, Subject } from "rxjs/Rx";
import { WebsocketService } from './websocket.service';
@Injectable({
providedIn: 'root'
@@ -31,7 +30,6 @@ export class ChatService {
private authService: AuthService,
private storage: Storage,
private storageService:StorageService,
private wsService: WebsocketService,
)
{
this.loggedUserChat = authService.ValidatedUserChat;
+3 -3
View File
@@ -13,11 +13,11 @@ export class RoomService {
chatUser: ChatUserService[] = []
id = ''
name = ''
name = 'teste'
_updatedAt = {}
private hasLoadHistory = false
duration = ''
constructor(
public WsChatService: WsChatService,
@@ -61,7 +61,7 @@ export class RoomService {
this.WsChatService.loadHistory(this.id, limit).then((message:any) => {
console.log('loadHistory', message)
message.result.messages.reverse().forEach(element => {
console.log('element', element)
element = this.fix_updatedAt(element)
@@ -113,7 +113,7 @@ export class WsChatMethodsService {
}
private isIndividual(roomData) {
return !roomData.fname
return roomData.t == "d";
}
}