Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
e40d8293
Commit
e40d8293
authored
10 years ago
by
Emmanuel ROHEE
Browse files
Options
Downloads
Patches
Plain Diff
Support limit and feedback param of initialSync
parent
c585c87c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
webclient/components/matrix/matrix-service.js
+11
-2
11 additions, 2 deletions
webclient/components/matrix/matrix-service.js
webclient/home/home-controller.js
+4
-1
4 additions, 1 deletion
webclient/home/home-controller.js
with
15 additions
and
3 deletions
webclient/components/matrix/matrix-service.js
+
11
−
2
View file @
e40d8293
...
@@ -106,11 +106,20 @@ angular.module('matrixService', [])
...
@@ -106,11 +106,20 @@ angular.module('matrixService', [])
},
},
// List all rooms joined or been invited to
// List all rooms joined or been invited to
rooms
:
function
(
from
,
to
,
limit
)
{
rooms
:
function
(
limit
,
feedback
)
{
// The REST path spec
// The REST path spec
var
path
=
"
/initialSync
"
;
var
path
=
"
/initialSync
"
;
return
doRequest
(
"
GET
"
,
path
);
var
params
=
{};
if
(
limit
)
{
params
.
limit
=
limit
;
}
if
(
feedback
)
{
params
.
feedback
=
feedback
;
}
return
doRequest
(
"
GET
"
,
path
,
params
);
},
},
// Joins a room
// Joins a room
...
...
This diff is collapsed.
Click to expand it.
webclient/home/home-controller.js
+
4
−
1
View file @
e40d8293
...
@@ -78,12 +78,15 @@ angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload',
...
@@ -78,12 +78,15 @@ angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload',
var
refresh
=
function
()
{
var
refresh
=
function
()
{
// List all rooms joined or been invited to
// List all rooms joined or been invited to
matrixService
.
rooms
(
1
,
tru
e
).
then
(
matrixService
.
rooms
(
1
,
fals
e
).
then
(
function
(
response
)
{
function
(
response
)
{
var
data
=
assignRoomAliases
(
response
.
data
.
rooms
);
var
data
=
assignRoomAliases
(
response
.
data
.
rooms
);
$scope
.
feedback
=
"
Success
"
;
$scope
.
feedback
=
"
Success
"
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
$scope
.
rooms
[
data
[
i
].
room_id
]
=
data
[
i
];
$scope
.
rooms
[
data
[
i
].
room_id
]
=
data
[
i
];
// Create a shortcut for the last message of this room
$scope
.
rooms
[
data
[
i
].
room_id
].
lastMsg
=
data
[
i
].
messages
.
chunk
[
0
];
}
}
var
presence
=
response
.
data
.
presence
;
var
presence
=
response
.
data
.
presence
;
...
...
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