Loading server/console_channel.go +8 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,14 @@ func (s *ConsoleServer) ListChannelMessages(ctx context.Context, in *console.Lis return nil, status.Error(codes.InvalidArgument, "Cursor is invalid or expired.") } haystack := time.Unix(in.HaystackSec, 0).UTC() messageList, err := ChannelMessagesList(ctx, s.logger, s.db, uuid.Nil, *stream, channelId, limit, in.Forward, cursor, &haystack) var haystack *time.Time if in.HaystackSec != nil { h := time.Unix(in.HaystackSec.Value, 0).UTC() haystack = &h } else { haystack = nil } messageList, err := ChannelMessagesList(ctx, s.logger, s.db, uuid.Nil, *stream, channelId, limit, in.Forward, cursor, haystack) if err == runtime.ErrChannelCursorInvalid { return nil, status.Error(codes.InvalidArgument, "Cursor is invalid or expired.") } else if err != nil { Loading Loading
server/console_channel.go +8 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,14 @@ func (s *ConsoleServer) ListChannelMessages(ctx context.Context, in *console.Lis return nil, status.Error(codes.InvalidArgument, "Cursor is invalid or expired.") } haystack := time.Unix(in.HaystackSec, 0).UTC() messageList, err := ChannelMessagesList(ctx, s.logger, s.db, uuid.Nil, *stream, channelId, limit, in.Forward, cursor, &haystack) var haystack *time.Time if in.HaystackSec != nil { h := time.Unix(in.HaystackSec.Value, 0).UTC() haystack = &h } else { haystack = nil } messageList, err := ChannelMessagesList(ctx, s.logger, s.db, uuid.Nil, *stream, channelId, limit, in.Forward, cursor, haystack) if err == runtime.ErrChannelCursorInvalid { return nil, status.Error(codes.InvalidArgument, "Cursor is invalid or expired.") } else if err != nil { Loading