2023-07-09 11:16:52 +00:00
|
|
|
package routes
|
|
|
|
|
|
|
|
import (
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
|
|
|
2023-07-17 13:51:31 +00:00
|
|
|
"go.mau.fi/mautrix-gmessages/libgm/gmproto"
|
2023-07-09 11:16:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Route struct {
|
2023-07-17 13:51:31 +00:00
|
|
|
Action gmproto.ActionType
|
|
|
|
MessageType gmproto.MessageType
|
|
|
|
BugleRoute gmproto.BugleRoute
|
2023-07-09 11:16:52 +00:00
|
|
|
ResponseStruct proto.Message
|
|
|
|
UseSessionID bool
|
|
|
|
UseTTL bool
|
|
|
|
}
|
|
|
|
|
2023-07-17 13:51:31 +00:00
|
|
|
var Routes = map[gmproto.ActionType]Route{
|
|
|
|
gmproto.ActionType_IS_BUGLE_DEFAULT: IS_BUGLE_DEFAULT,
|
|
|
|
gmproto.ActionType_GET_UPDATES: GET_UPDATES,
|
|
|
|
gmproto.ActionType_LIST_CONVERSATIONS: LIST_CONVERSATIONS,
|
|
|
|
gmproto.ActionType_LIST_CONVERSATIONS_SYNC: LIST_CONVERSATIONS_WITH_UPDATES,
|
|
|
|
gmproto.ActionType_MESSAGE_READ: MESSAGE_READ,
|
|
|
|
gmproto.ActionType_NOTIFY_DITTO_ACTIVITY: NOTIFY_DITTO_ACTIVITY,
|
|
|
|
gmproto.ActionType_GET_CONVERSATION_TYPE: GET_CONVERSATION_TYPE,
|
|
|
|
gmproto.ActionType_LIST_MESSAGES: LIST_MESSAGES,
|
|
|
|
gmproto.ActionType_SEND_MESSAGE: SEND_MESSAGE,
|
|
|
|
gmproto.ActionType_SEND_REACTION: SEND_REACTION,
|
|
|
|
gmproto.ActionType_DELETE_MESSAGE: DELETE_MESSAGE,
|
|
|
|
gmproto.ActionType_TYPING_UPDATES: TYPING_UPDATES,
|
|
|
|
gmproto.ActionType_GET_PARTICIPANTS_THUMBNAIL: GET_PARTICIPANT_THUMBNAIL,
|
|
|
|
gmproto.ActionType_LIST_CONTACTS: LIST_CONTACTS,
|
|
|
|
gmproto.ActionType_LIST_TOP_CONTACTS: LIST_TOP_CONTACTS,
|
|
|
|
gmproto.ActionType_GET_OR_CREATE_CONVERSATION: GET_OR_CREATE_CONVERSATION,
|
2023-07-09 11:16:52 +00:00
|
|
|
}
|