* Addressbook: Fix videoconference online check caused an error with non-user contacts

This commit is contained in:
nathangray 2020-05-20 11:02:04 -06:00
parent 3626679408
commit ded0ef4264
2 changed files with 2 additions and 3 deletions

View File

@ -1085,7 +1085,6 @@ var AddressbookApp = /** @class */ (function (_super) {
* @param _selected * @param _selected
*/ */
AddressbookApp.prototype.videoconference_isUserOnline = function (_action, _selected) { AddressbookApp.prototype.videoconference_isUserOnline = function (_action, _selected) {
var _a;
var list = app.status ? app.status.getEntireList() : {}; var list = app.status ? app.status.getEntireList() : {};
for (var sel in _selected) { for (var sel in _selected) {
if (sel == '0' && _selected[sel]['id'] == 'nm') if (sel == '0' && _selected[sel]['id'] == 'nm')
@ -1093,7 +1092,7 @@ var AddressbookApp = /** @class */ (function (_super) {
var row = egw.dataGetUIDdata(_selected[sel]['id']); var row = egw.dataGetUIDdata(_selected[sel]['id']);
var enabled = false; var enabled = false;
for (var entry in list) { for (var entry in list) {
if (((_a = row.data) === null || _a === void 0 ? void 0 : _a.account_id) == list[entry]['account_id']) { if (row.data && row.data.account_id && row.data.account_id == list[entry]['account_id']) {
enabled = list[entry]['data']['status']['active']; enabled = list[entry]['data']['status']['active'];
} }
} }

View File

@ -1331,7 +1331,7 @@ class AddressbookApp extends EgwApp
let enabled = false; let enabled = false;
for(let entry in list) for(let entry in list)
{ {
if (row.data?.account_id == list[entry]['account_id']) if (row.data && row.data.account_id && row.data.account_id == list[entry]['account_id'])
{ {
enabled = list[entry]['data']['status']['active']; enabled = list[entry]['data']['status']['active'];
} }