Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python-bigbluebutton2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
InfraBlue
python-bigbluebutton2
Commits
aee69f3b
Verified
Commit
aee69f3b
authored
4 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Support passing redirect from join in handle_from_data
parent
122a11f2
No related branches found
No related tags found
No related merge requests found
Pipeline
#5075
failed
4 years ago
Stage: test
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bigbluebutton/api/bigbluebutton.py
+18
-12
18 additions, 12 deletions
bigbluebutton/api/bigbluebutton.py
bigbluebutton/django/views.py
+6
-1
6 additions, 1 deletion
bigbluebutton/django/views.py
with
24 additions
and
13 deletions
bigbluebutton/api/bigbluebutton.py
+
18
−
12
View file @
aee69f3b
...
...
@@ -637,19 +637,25 @@ class BigBlueButtonGroup:
meeting
=
self
.
_find_meeting
(
attrs
[
"
meetingID
"
],
filter_meta
)
if
meeting
:
kwargs
=
Attendee
.
get_kwargs_from_url_args
(
attrs
,
meeting
)
do_join
=
not
(
attrs
.
get
(
"
redirect
"
,
"
true
"
)
==
"
true
"
)
attendee
=
Attendee
(
meeting
=
meeting
,
**
kwargs
)
attendee
.
join
()
# We need to construct this one response manually, because for some inobvious
# reason the designers of the BBB API changed their minds and started using
# snake_case instead of dromedarCase
return
{
"
meeting_id
"
:
meeting
.
meeting_id
,
"
user_id
"
:
attendee
.
user_id
,
"
auth_token
"
:
attendee
.
auth_token
,
"
session_token
"
:
attendee
.
session_token
,
"
url
"
:
attendee
.
url
,
}
res
=
attendee
.
join
(
do_join
=
do_join
)
if
do_join
:
# We need to construct this one response manually, because for some inobvious
# reason the designers of the BBB API changed their minds and started using
# snake_case instead of dromedarCase
return
{
"
meeting_id
"
:
meeting
.
meeting_id
,
"
user_id
"
:
attendee
.
user_id
,
"
auth_token
"
:
attendee
.
auth_token
,
"
session_token
"
:
attendee
.
session_token
,
"
url
"
:
attendee
.
url
,
}
else
:
return
res
else
:
raise
KeyError
(
"
Meeting not found.
"
)
elif
method
==
"
isMeetingRunning
"
:
...
...
This diff is collapsed.
Click to expand it.
bigbluebutton/django/views.py
+
6
−
1
View file @
aee69f3b
...
...
@@ -3,6 +3,7 @@ from typing import Optional
from
django.contrib.sites.shortcuts
import
get_current_site
from
django.db.models
import
QuerySet
from
django.http
import
HttpRequest
,
HttpResponse
from
django.shortcuts
import
redirect
from
django.views
import
View
from
defusedxml
import
minidom
...
...
@@ -61,7 +62,11 @@ class APIView(View):
res
=
api_token
.
server_group
.
api_group
.
handle_from_data
(
method
,
attrs
,
request
.
body
,
filter_meta
)
return
self
.
_success
(
""
,
res
)
if
isinstance
(
res
,
dict
):
return
self
.
_success
(
""
,
res
)
elif
isinstance
(
res
,
str
):
return
redirect
(
res
)
except
NotImplementedError
:
return
self
.
_error
(
404
,
"
xInfraBlueUnknownAPICall
"
,
f
"
The API call
{
method
}
is not known
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment