mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix bug in create new room
This commit is contained in:
@@ -39,7 +39,7 @@ export class RoomService {
|
||||
private sqlservice: SqliteService,
|
||||
) { }
|
||||
|
||||
setData({ customFields, id, name, t, lastMessage, _updatedAt }) {
|
||||
setData({ customFields, id, name, t, lastMessage = new MessageService(), _updatedAt }) {
|
||||
this.customFields = customFields
|
||||
this.id = id
|
||||
this.name = name
|
||||
@@ -62,6 +62,7 @@ export class RoomService {
|
||||
/* this.ToastService._chatMessage({message:'Nova mensagem', sender:'Gilson'}) */
|
||||
const message = new MessageService()
|
||||
message.setData(ChatMessage)
|
||||
|
||||
this.lastMessage.msg = message.msg
|
||||
if (message.t == 'r') { this.name = message.msg }
|
||||
this.calDateDuration(ChatMessage._updatedAt)
|
||||
|
||||
Reference in New Issue
Block a user