Skip to content

Commit

Permalink
fix: rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
liaosunny123 committed Aug 29, 2023
1 parent 7dfa964 commit 1152ade
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/idl/chat.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ option go_package = "GuGoTik/src/rpc/chat";
message ChatRequest {
uint32 actor_id = 1;
uint32 user_id = 2;
uint32 pre_msg_time = 3;
uint64 pre_msg_time = 3;
}

message Message {
uint32 id = 1;
string content = 2;
uint32 create_time = 3;
uint64 create_time = 3;
optional uint32 from_user_id = 4;
optional uint32 to_user_id = 5;
}
Expand Down
12 changes: 6 additions & 6 deletions src/rpc/chat/chat.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/services/message/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (c MessageServiceImpl) Chat(ctx context.Context, request *chat.ChatRequest)
rMessageList = append(rMessageList, &chat.Message{
Id: pMessage.ID,
Content: pMessage.Content,
CreateTime: uint32(pMessage.CreatedAt.Unix()),
CreateTime: uint64(pMessage.CreatedAt.UnixMicro()),
FromUserId: &pMessage.FromUserId,
ToUserId: &pMessage.ToUserId,
})
Expand Down
2 changes: 1 addition & 1 deletion src/services/publish/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
// Configure Pyroscope
profiling.InitPyroscope("GuGoTik.PublishService")

maxSize := 100 * 1024 * 1024
maxSize := 500 * 1024 * 1024
s := grpc.NewServer(
grpc.MaxRecvMsgSize(maxSize),
grpc.MaxSendMsgSize(maxSize),
Expand Down
2 changes: 1 addition & 1 deletion src/web/models/Message.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type SMessageRes struct {
type ListMessageReq struct {
ActorId uint32 `form:"actor_id" binding:"required"`
ToUserId uint32 `form:"to_user_id" binding:"required"`
PreMsgTime uint32 `form:"pre_msg_time"`
PreMsgTime uint64 `form:"pre_msg_time"`
}

type ListMessageRes struct {
Expand Down

0 comments on commit 1152ade

Please sign in to comment.