Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable30] feat(email): Recognize guests invited via email #13617

Merged
merged 14 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(calls): Count email guests as guests in the call summary
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Oct 23, 2024
commit d3f423931a23702141fb46b46bb2678218443c85
3 changes: 2 additions & 1 deletion lib/Activity/Listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ protected function generateCallActivity(ACallEndedEvent $event): void {
$duration = $this->timeFactory->getTime() - $activeSince->getTimestamp();
$userIds = $this->participantService->getParticipantUserIds($room, $activeSince);
$cloudIds = $this->participantService->getParticipantActorIdsByActorType($room, [Attendee::ACTOR_FEDERATED_USERS], $activeSince);
$numGuests = $this->participantService->getGuestCount($room, $activeSince);
$numGuests = $this->participantService->getActorsCountByType($room, Attendee::ACTOR_GUESTS, $activeSince->getTimestamp());
$numGuests += $this->participantService->getActorsCountByType($room, Attendee::ACTOR_EMAILS, $activeSince->getTimestamp());

$message = 'call_ended';
if ($event instanceof CallEndedForEveryoneEvent) {
Expand Down
9 changes: 2 additions & 7 deletions lib/Service/ParticipantService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1724,13 +1724,8 @@ public function getParticipantActorIdsByActorType(Room $room, array $actorTypes,
}, $attendees);
}

public function getGuestCount(Room $room, ?\DateTime $maxLastJoined = null): int {
$maxLastJoinedTimestamp = null;
if ($maxLastJoined !== null) {
$maxLastJoinedTimestamp = $maxLastJoined->getTimestamp();
}

return $this->attendeeMapper->getActorsCountByType($room->getId(), Attendee::ACTOR_GUESTS, $maxLastJoinedTimestamp);
public function getActorsCountByType(Room $room, string $actorType, int $maxLastJoined): int {
return $this->attendeeMapper->getActorsCountByType($room->getId(), $actorType, $maxLastJoined);
}

/**
Expand Down