From 6cdd92ef8ad38f05b24f7d7f1daf8c31f65daf49 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 11 Oct 2017 11:38:43 +0200 Subject: [PATCH] add participant devices on participant added notifications --- src/conference/local-conference-event-handler.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp index d58835022..3594c160a 100644 --- a/src/conference/local-conference-event-handler.cpp +++ b/src/conference/local-conference-event-handler.cpp @@ -115,10 +115,21 @@ string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdded (const A ConferenceType confInfo = ConferenceType(entity); UsersType users; confInfo.setUsers(users); - UserType user = UserType(); UserRolesType roles; UserType::EndpointSequence endpoints; + + shared_ptr p = conf->findParticipant(addr); + if (p) { + for (const auto &device : p->getPrivate()->getDevices()) { + const string &gruu = device.getGruu().asStringUriOnly(); + EndpointType endpoint = EndpointType(); + endpoint.setEntity(gruu); + endpoint.setState("full"); + user.getEndpoint().push_back(endpoint); + } + } + user.setRoles(roles); user.setEntity(addr.asStringUriOnly()); user.getRoles()->getEntry().push_back("participant");