syntax = "proto3";

package ccim.protocol;

import "message_spec.proto";

message SendMessageRequest {
    int64 receiver_user_id = 1;
    string content = 2;
    MessageType msg_type = 3;
}

message SendMessageResponse {
    int64 msg_id = 1;
}

//message SendGroupMessageRequest {
//  int64 group_id = 1;
//  string content = 2;
//  MessageType msg_type = 3;
//}
//
//message SendGroupMessageResponse {
//  int64 msg_id = 1;
//}

message SendChannelMessageRequest {
    int64 channel_id = 1;
    string content = 2;
    MessageType msg_type = 3;
}

message SendChannelMessageResponse {
    int64 msg_id = 1;
}

message PullOfflineMessageRequest {
    int64 last_pulled_msg_id = 1;
}

message PullOfflineMessageResponse {
    message OfflineMessage {
        int64 msg_src_id = 1;
        MessageSourceType msg_src_type = 2;
        ChatMessage message = 3;
        int64 send_date = 4;
    }
    repeated OfflineMessage offline_msgs = 1;
}
