ios

package
v0.0.0-...-e37cea9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IncomingMessage            ipc.Command = "message"
	IncomingReadReceipt        ipc.Command = "read_receipt"
	IncomingTypingNotification ipc.Command = "typing"
	IncomingChat               ipc.Command = "chat"
	IncomingChatID             ipc.Command = "chat_id"
	IncomingPingServer         ipc.Command = "ping_server"
	IncomingBridgeStatus       ipc.Command = "bridge_status"
	IncomingContact            ipc.Command = "contact"
	IncomingMessageIDQuery     ipc.Command = "message_ids_after_time"
	IncomingPushKey            ipc.Command = "push_key"
	IncomingSendMessageStatus  ipc.Command = "send_message_status"
	IncomingBackfillTask       ipc.Command = "backfill"
)
View Source
const (
	ReqSendMessage         ipc.Command = "send_message"
	ReqSendMedia           ipc.Command = "send_media"
	ReqSendTapback         ipc.Command = "send_tapback"
	ReqSendReadReceipt     ipc.Command = "send_read_receipt"
	ReqSetTyping           ipc.Command = "set_typing"
	ReqGetChats            ipc.Command = "get_chats"
	ReqGetChat             ipc.Command = "get_chat"
	ReqGetChatAvatar       ipc.Command = "get_chat_avatar"
	ReqGetContact          ipc.Command = "get_contact"
	ReqGetContactList      ipc.Command = "get_contact_list"
	ReqGetMessagesAfter    ipc.Command = "get_messages_after"
	ReqGetRecentMessages   ipc.Command = "get_recent_messages"
	ReqGetMessage          ipc.Command = "get_message"
	ReqPreStartupSync      ipc.Command = "pre_startup_sync"
	ReqPostStartupSync     ipc.Command = "post_startup_sync"
	ReqResolveIdentifier   ipc.Command = "resolve_identifier"
	ReqPrepareDM           ipc.Command = "prepare_dm"
	ReqCreateGroup         ipc.Command = "prepare_group_chat"
	ReqMessageBridgeResult ipc.Command = "message_bridge_result"
	ReqChatBridgeResult    ipc.Command = "chat_bridge_result"
	ReqBackfillResult      ipc.Command = "backfill_result"
	ReqUpcomingMessage     ipc.Command = "upcoming_message"
)

Variables

This section is empty.

Functions

func NewiOSConnector

func NewiOSConnector(bridge imessage.Bridge) (imessage.API, error)

Types

type APIWithIPC

type APIWithIPC interface {
	imessage.API
	SetIPC(*ipc.Processor)
	SetContactProxy(api imessage.ContactAPI)
	SetChatInfoProxy(api imessage.ChatInfoAPI)
}

func NewPlainiOSConnector

func NewPlainiOSConnector(logger log.Logger, bridge imessage.Bridge) APIWithIPC

type BackfillResult

type BackfillResult struct {
	ChatGUID   string `json:"chat_guid"`
	BackfillID string `json:"backfill_id"`
	Success    bool   `json:"success"`

	MessageIDs map[string][]id.EventID `json:"message_ids"`
}

type ChatBridgeResult

type ChatBridgeResult struct {
	ChatGUID string    `json:"chat_guid"`
	MXID     id.RoomID `json:"mxid"`
}

type ChatIDChangeRequest

type ChatIDChangeRequest struct {
	OldGUID string `json:"old_guid"`
	NewGUID string `json:"new_guid"`
}

type ChatIDChangeResponse

type ChatIDChangeResponse struct {
	Changed bool `json:"changed"`
}

type CreateGroupRequest

type CreateGroupRequest struct {
	GUIDs []string `json:"guids"`
}

type GetChatRequest

type GetChatRequest struct {
	ChatGUID string `json:"chat_guid"`
	ThreadID string `json:"thread_id"`
}

type GetChatsRequest

type GetChatsRequest struct {
	MinTimestamp float64 `json:"min_timestamp"`
}

type GetContactListResponse

type GetContactListResponse struct {
	Contacts []*imessage.Contact `json:"contacts"`
}

type GetContactRequest

type GetContactRequest struct {
	UserGUID string `json:"user_guid"`
}

type GetMessageRequest

type GetMessageRequest struct {
	GUID string `json:"guid"`
}

type GetMessagesAfterRequest

type GetMessagesAfterRequest struct {
	ChatGUID   string  `json:"chat_guid"`
	Timestamp  float64 `json:"timestamp"`
	BackfillID string  `json:"backfill_id"`
}

type GetRecentMessagesRequest

type GetRecentMessagesRequest struct {
	ChatGUID   string `json:"chat_guid"`
	Limit      int    `json:"limit"`
	BackfillID string `json:"backfill_id"`
}

type MessageBridgeResult

type MessageBridgeResult struct {
	ChatGUID string     `json:"chat_guid"`
	GUID     string     `json:"message_guid"`
	EventID  id.EventID `json:"event_id,omitempty"`
	Success  bool       `json:"success"`
}

type MessageIDQueryRequest

type MessageIDQueryRequest struct {
	ChatGUID  string  `json:"chat_guid"`
	AfterTime float64 `json:"after_time"`
}

type MessageIDQueryResponse

type MessageIDQueryResponse struct {
	IDs []string `json:"ids"`
}

type PingServerResponse

type PingServerResponse struct {
	Start  float64 `json:"start_ts"`
	Server float64 `json:"server_ts"`
	End    float64 `json:"end_ts"`
}

type PrepareDMRequest

type PrepareDMRequest struct {
	GUID string `json:"guid"`
}

type ResolveIdentifierRequest

type ResolveIdentifierRequest struct {
	Identifier string `json:"identifier"`
}

type ResolveIdentifierResponse

type ResolveIdentifierResponse struct {
	GUID string `json:"guid"`
}

type SendMediaRequest

type SendMediaRequest struct {
	ChatGUID string `json:"chat_guid"`
	Text     string `json:"text"`
	imessage.Attachment
	ReplyTo        string                   `json:"reply_to"`
	ReplyToPart    int                      `json:"reply_to_part"`
	IsAudioMessage bool                     `json:"is_audio_message"`
	Metadata       imessage.MessageMetadata `json:"metadata,omitempty"`
}

type SendMessageRequest

type SendMessageRequest struct {
	ChatGUID    string                   `json:"chat_guid"`
	Text        string                   `json:"text"`
	ReplyTo     string                   `json:"reply_to"`
	ReplyToPart int                      `json:"reply_to_part"`
	RichLink    *imessage.RichLink       `json:"rich_link,omitempty"`
	Metadata    imessage.MessageMetadata `json:"metadata,omitempty"`
}

type SendReadReceiptRequest

type SendReadReceiptRequest struct {
	ChatGUID string `json:"chat_guid"`
	ReadUpTo string `json:"read_up_to"`
}

type SendTapbackRequest

type SendTapbackRequest struct {
	ChatGUID   string               `json:"chat_guid"`
	TargetGUID string               `json:"target_guid"`
	TargetPart int                  `json:"target_part"`
	Type       imessage.TapbackType `json:"type"`
}

type SetTypingRequest

type SetTypingRequest struct {
	ChatGUID string `json:"chat_guid"`
	Typing   bool   `json:"typing"`
}

type UpcomingMessage

type UpcomingMessage struct {
	EventID id.EventID `json:"event_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL