Load users presence

This commit is contained in:
2021-04-21 16:48:50 +02:00
parent 8705fc6581
commit 5f5f27e79d
7 changed files with 76 additions and 0 deletions

View File

@ -119,6 +119,12 @@ const GroupsPage = {
GroupConversationPage.show(conv, target)
return;
}
case "presence":
if (group.is_forez_group) {
await GroupPresencePage.Show(group, target)
return;
}
default:
ComunicWeb.common.error.pageNotFound(null, target);

View File

@ -0,0 +1,22 @@
/**
* Group presence tab
*
* This is a Forez feature
*
* @author Pierre Hubert
*/
class GroupPresencePage {
/**
* Show the page
*
* @param {AdvancedGroupInfo} group
* @param {HTMLElement} target
*/
static async Show(group, target) {
const presence = await ForezPresenceHelper.GetList(group.id);
const users = await getUsers([...new Set(presence.map(e => e.userID))]);
console.error(presence, users)
}
}

View File

@ -28,6 +28,7 @@ const GroupTabs = {
activePage: activePage,
firstArgument: firstArgument,
conversations: group.conversations,
is_forez: group.is_forez_group
}
},