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

↕️ Split participants into 👤 Attendees and ⏳ Sessions #4324

Merged
merged 75 commits into from
Oct 30, 2020

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Oct 8, 2020

The old participant (table) has been split into 2 sub components:

  • Participant (consists of)
    • Attendee (always there):

      • Participant identifier (to map the session data)
      • Room id/token
      • Identifier: User id, group id, email-address, random-id for guests
        • Actor type: users, emails, guests (future: groups and circles to track them to automatically add/remove users)
        • Actor id: userid, email address, session hash, group id, circle id
      • Participant type
      • Attendee favorited the room
      • Selected notification level
      • PIN (new for the upcoming SIP 🤙 SIP Bridge #4496 )
      • Last mention comment
      • Last read comment
      • Last joined call (for the call summary)
    • Session (optional, currently still limited to 1 per attendee):

      • Attendee ID
      • SessionId - random string for WebRTC
      • In call flag
      • Last ping (is currently only used to timeout users from the call, therefor it does not require to be kept in the participant data)

The most important thing is that users are no longer identified by userId || sessionId, as they might not have a session and not be a logged in user. the new identifier is actor type+id

Also I started to get rid of the queries and modifying functions in the room object. Attendee and Session are "ordinary" OCP\AppFramework\Db\Entity objects and I hope the Room will be too at some point. This entries are modified internally via the respective OCP\AppFramework\Db\QBMapper, but access to those should only be done via the ParticipantService (only exception being the Manager which needs to be able to use QBMapper::mapRowToEntity to create the objects and I don't want to expose this function on the service.

Fix #2020

@nickvergessen nickvergessen force-pushed the feature/noid/sip-option branch 2 times, most recently from 4dcf6a1 to 8d45ec8 Compare October 16, 2020 09:32
@@ -469,24 +555,53 @@ protected function formatRoomV2(Room $room, ?Participant $currentParticipant): a
$lobbyTimer = 0;
}

if ($isSIPBridgeRequest) {
return array_merge($roomData, [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add information on the participant (for the case information is returned based on the PIN):

  • the userid if it's a known user
  • participantType

If you want to match web- and phone users that are invited by email, e.g. for muting web audio if dialed in by phone, something unique should be returned that is shared for both connections. You could for example use an internal user id like invited:<email>.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to match web- and phone users that are invited by email,

let's focus on email invited guests for now and we figure out the logged in users once this works.

Please also add information on the participant (for the case information is returned based on the PIN):

Opss, yeah since its a sip request we skip that, not intended on the pin verification

@nickvergessen
Copy link
Member Author

nickvergessen commented Oct 29, 2020

The last commit (201b9aa) disables the SIP UI parts temporarily. The split of participants into session + attendee should be complete mostly. We could therefor risk a merge into master and then I continue in a new PR before there is too much happening

@nickvergessen nickvergessen marked this pull request as ready for review October 29, 2020 19:35
@nickvergessen nickvergessen force-pushed the feature/noid/sip-option branch from 2d35a6e to 201b9aa Compare October 29, 2020 19:54
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…future so email pins remain)

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…guests table in

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feature/noid/sip-option branch from 201b9aa to 13d5596 Compare October 30, 2020 09:39
@nickvergessen
Copy link
Member Author

Rebased after #4489

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments already.

I'm only halfway through, will continue soon

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added minor comments for the second half

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nickvergessen nickvergessen merged commit a9fb5ba into master Oct 30, 2020
@nickvergessen nickvergessen deleted the feature/noid/sip-option branch October 30, 2020 13:12
@nickvergessen
Copy link
Member Author

/backport to stable20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Splitting participants and sessions
3 participants