update user status

This commit is contained in:
Peter Maquiran
2023-09-22 17:25:27 +01:00
parent aaa11f98b2
commit e4bba2e68b
4 changed files with 120 additions and 113 deletions
+7 -4
View File
@@ -104,6 +104,7 @@ export class ChatSystemService {
document.addEventListener('resume', function () {
this.RochetChatConnectorService.setStatus('online')
if(this._dm?.length == 0 && this._group?.length == 0) {
this.getAllRooms();
}
@@ -516,16 +517,18 @@ export class ChatSystemService {
const userId = d.fields.args[0][0]
const username = d.fields.args[0][1]
const statusNum = d.fields.args[0][2]
let statusNum = d.fields.args[0][2]
const statusText = this.statusNumberToText(statusNum)
for ( const user of this.users) {
if(user._id == userId) {
user.status = statusText
for ( const user in this.users) {
if(this.users[user]._id == userId) {
this.users[user].status = statusText
}
}
console.log('user status', d)
})
}