Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nakama
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public-projects
Nakama
Commits
f0ead1c5
Commit
f0ead1c5
authored
Aug 29, 2022
by
Fernando Takagi
Browse files
Options
Downloads
Patches
Plain Diff
Add to api client
parent
df30ba73
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
apigrpc/apigrpc.swagger.json
+8
-0
8 additions, 0 deletions
apigrpc/apigrpc.swagger.json
server/api_channel.go
+6
-1
6 additions, 1 deletion
server/api_channel.go
with
14 additions
and
1 deletion
apigrpc/apigrpc.swagger.json
+
8
−
0
View file @
f0ead1c5
...
@@ -1319,6 +1319,14 @@
...
@@ -1319,6 +1319,14 @@
"in"
:
"query"
,
"in"
:
"query"
,
"required"
:
false
,
"required"
:
false
,
"type"
:
"string"
"type"
:
"string"
},
{
"name"
:
"instant"
,
"description"
:
"Time which around to list messages in seconds (since epoch), if any. Used only if no cursor is provided."
,
"in"
:
"query"
,
"required"
:
false
,
"type"
:
"string"
,
"format"
:
"int64"
}
}
],
],
"tags"
:
[
"tags"
:
[
...
...
This diff is collapsed.
Click to expand it.
server/api_channel.go
+
6
−
1
View file @
f0ead1c5
...
@@ -68,12 +68,17 @@ func (s *ApiServer) ListChannelMessages(ctx context.Context, in *api.ListChannel
...
@@ -68,12 +68,17 @@ func (s *ApiServer) ListChannelMessages(ctx context.Context, in *api.ListChannel
forward
=
in
.
GetForward
()
.
Value
forward
=
in
.
GetForward
()
.
Value
}
}
var
instant
int64
if
in
.
GetInstant
()
!=
nil
{
instant
=
in
.
GetInstant
()
.
Value
}
streamConversionResult
,
err
:=
ChannelIdToStream
(
in
.
ChannelId
)
streamConversionResult
,
err
:=
ChannelIdToStream
(
in
.
ChannelId
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
status
.
Error
(
codes
.
InvalidArgument
,
"Invalid channel ID."
)
return
nil
,
status
.
Error
(
codes
.
InvalidArgument
,
"Invalid channel ID."
)
}
}
messageList
,
err
:=
ChannelMessagesList
(
ctx
,
s
.
logger
,
s
.
db
,
userID
,
streamConversionResult
.
Stream
,
in
.
ChannelId
,
limit
,
forward
,
in
.
Cursor
,
nil
)
messageList
,
err
:=
ChannelMessagesList
(
ctx
,
s
.
logger
,
s
.
db
,
userID
,
streamConversionResult
.
Stream
,
in
.
ChannelId
,
limit
,
forward
,
in
.
Cursor
,
instant
)
if
err
==
runtime
.
ErrChannelCursorInvalid
{
if
err
==
runtime
.
ErrChannelCursorInvalid
{
return
nil
,
status
.
Error
(
codes
.
InvalidArgument
,
"Cursor is invalid or expired."
)
return
nil
,
status
.
Error
(
codes
.
InvalidArgument
,
"Cursor is invalid or expired."
)
}
else
if
err
==
runtime
.
ErrChannelGroupNotFound
{
}
else
if
err
==
runtime
.
ErrChannelGroupNotFound
{
...
...
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