Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyTextRangeEffectToText(text string, textEffect TextEffect) string
- func ConvertConvertedMessageToString(c *bridgev2.ConvertedMessage) string
- func ConvertEditToString(c *bridgev2.ConvertedEdit) string
- func Dump(data []byte) (lines []string)
- func ErrorToMessagePart(err error) *bridgev2.ConvertedMessagePart
- func FormatTextRangeEffectsOnText(text string, textRangeEffects []TextRangeEffect) string
- func FullName(firstName string, lastName string) string
- func GetImageFromVCard(vcard string) ([]byte, error)
- func GetMentionText(username string, server string, name string) string
- func GetTextFromComponents(components []Archivable) *string
- func GetValueAsArrayFromMapKey(input map[string]any, key string) ([]any, error)
- func GetValueAsByteArrayFromMapKey(input map[string]any, key string) ([]byte, error)
- func GetValueAsFloat64FromMapKey(input map[string]any, key string) (*float64, error)
- func GetValueAsMapFromMapKey(input map[string]any, key string) (map[string]any, error)
- func GetValueAsStringFromMapKey(input map[string]any, key string) (*string, error)
- func MakeMessagesPortalID(userLoginID networkid.UserLoginID, chatGUID string) networkid.PortalID
- func NewTypedStreamDecoder(encoded []byte, debug bool) typedStreamDecoder
- func ParseFormatPhoneNumber(phoneNumber string, countryCode string) (*networkid.UserID, error)
- func ReplaceHomeDirectory(input string) (string, error)
- func RunOsascript(script string, args ...string) (string, string, error)
- func SupplementChatMemberWithContactInformation(member *bridgev2.ChatMember, contactInformation ContactInformation, ...)
- func SupplementMemberMapWithContactsMap(memberMap *map[networkid.UserID]bridgev2.ChatMember, ...)
- func SupplementUserInfoWithContactInformation(userInfo *bridgev2.UserInfo, contactInformation ContactInformation, ...)
- type AnimationType
- type Archivable
- type ArchivableClass
- type ArchivableData
- type ArchivableObject
- type ArchivablePlaceholder
- type ArchivableTypes
- type Archivables
- type Attachment
- type AttachmentMeta
- type Class
- type ClassResult
- type ClassResultHierarchy
- type ClassResultIndex
- type CombinedComponent
- type CombinedComponentAttachment
- type CombinedComponentResult
- type CombinedComponentResultContinuation
- type CombinedComponentResultNew
- type CombinedComponentRetraction
- type CombinedComponentText
- type ComponentTypeKey
- type ContactInformation
- type ContactsDB
- type ConversionType
- type EditedEvent
- type EditedMessagePart
- type EditedMessageStatus
- type GroupActionType
- type Identifier
- type ItemType
- type MacOSContactsClient
- func (c MacOSContactsClient) GetContactUserInfo(id string) (*bridgev2.UserInfo, error)
- func (c MacOSContactsClient) GetContactsMap() (map[networkid.UserID]ContactInformation, error)
- func (c MacOSContactsClient) GetWrappedAvatarForID(ID string) *bridgev2.Avatar
- func (c MacOSContactsClient) ValidateConnection() error
- type MacOSMessagesClient
- func (c *MacOSMessagesClient) GetAllChatIDsNames() (map[string]string, error)
- func (c MacOSMessagesClient) GetChatDBPath() string
- func (c *MacOSMessagesClient) GetChatDetails(chatID networkid.PortalID) (*string, *bridgev2.Avatar, error)
- func (c MacOSMessagesClient) GetChatMemberMap(chatID networkid.PortalID, selfUserID networkid.UserID) (map[networkid.UserID]bridgev2.ChatMember, error)
- func (c *MacOSMessagesClient) GetMaxMessagesRow() (*int, error)
- func (c *MacOSMessagesClient) GetMaxMessagesTime() (*int64, error)
- func (c *MacOSMessagesClient) GetMessagesAboveRowID(rowID int) ([]*Message, error)
- func (c *MacOSMessagesClient) GetMessagesBetween(minRowID int, maxRowID int) ([]*Message, error)
- func (c *MacOSMessagesClient) GetMessagesNewerThan(t int64) ([]*Message, error)
- func (c *MacOSMessagesClient) GetReadReceiptsSince(minDate time.Time) ([]*ReadReceipt, time.Time, error)
- func (c MacOSMessagesClient) ValidateConnection() error
- type Message
- func (m *Message) ConvertAppMessageToMessagePart() *bridgev2.ConvertedMessagePart
- func (m *Message) ConvertAttributesToMessagePart(attributes []TextRangeEffect, index int) *bridgev2.ConvertedMessagePart
- func (m *Message) ConvertEditedMessagePart(componentIndex int) *bridgev2.ConvertedMessagePart
- func (m *Message) ConvertMessageText() *bridgev2.ConvertedMessagePart
- func (m *Message) ConvertMessageToParts(ctx context.Context, intent bridgev2.MatrixAPI, roomId id.RoomID) ([]*bridgev2.ConvertedMessagePart, error)
- func (m *Message) IsPartEdited(index int) bool
- func (m Message) String() string
- type MockMatrixAPI
- func (m *MockMatrixAPI) CreateRoom(ctx context.Context, req *mautrix.ReqCreateRoom) (id.RoomID, error)
- func (m *MockMatrixAPI) DeleteRoom(ctx context.Context, roomID id.RoomID, puppetsOnly bool) error
- func (m *MockMatrixAPI) DownloadMedia(ctx context.Context, uri id.ContentURIString, file *event.EncryptedFileInfo) ([]byte, error)
- func (m *MockMatrixAPI) DownloadMediaToFile(ctx context.Context, uri id.ContentURIString, file *event.EncryptedFileInfo, ...) error
- func (m *MockMatrixAPI) EnsureInvited(ctx context.Context, roomID id.RoomID, userID id.UserID) error
- func (m *MockMatrixAPI) EnsureJoined(ctx context.Context, roomID id.RoomID) error
- func (m *MockMatrixAPI) GetMXID() id.UserID
- func (m *MockMatrixAPI) IsDoublePuppet() bool
- func (m *MockMatrixAPI) MarkRead(ctx context.Context, roomID id.RoomID, eventID id.EventID, ts time.Time) error
- func (m *MockMatrixAPI) MarkTyping(ctx context.Context, roomID id.RoomID, typingType bridgev2.TypingType, ...) error
- func (m *MockMatrixAPI) MarkUnread(ctx context.Context, roomID id.RoomID, unread bool) error
- func (m *MockMatrixAPI) MuteRoom(ctx context.Context, roomID id.RoomID, until time.Time) error
- func (m *MockMatrixAPI) SendMessage(ctx context.Context, roomID id.RoomID, eventType event.Type, ...) (*mautrix.RespSendEvent, error)
- func (m *MockMatrixAPI) SendState(ctx context.Context, roomID id.RoomID, eventType event.Type, stateKey string, ...) (*mautrix.RespSendEvent, error)
- func (m *MockMatrixAPI) SetAvatarURL(ctx context.Context, avatarURL id.ContentURIString) error
- func (m *MockMatrixAPI) SetDisplayName(ctx context.Context, name string) error
- func (m *MockMatrixAPI) SetExtraProfileMeta(ctx context.Context, data any) error
- func (m *MockMatrixAPI) TagRoom(ctx context.Context, roomID id.RoomID, tag event.RoomTag, isTagged bool) error
- func (m *MockMatrixAPI) UploadMedia(ctx context.Context, roomID id.RoomID, data []byte, fileName string, ...) (url id.ContentURIString, file *event.EncryptedFileInfo, err error)
- func (m *MockMatrixAPI) UploadMediaStream(ctx context.Context, roomID id.RoomID, size int64, requireFile bool, ...) (url id.ContentURIString, file *event.EncryptedFileInfo, err error)
- type OutputDataTypes
- type ReadReceipt
- type StickerSource
- type Style
- type Tapback
- type TapbackType
- type TextEffect
- type TextEffectAnimation
- type TextEffectConversion
- type TextEffectDefault
- type TextEffectLink
- type TextEffectMention
- type TextEffectOTP
- type TextEffectStyles
- type TextEffects
- type TextRangeEffect
- type Type
- type TypeVariant
Constants ¶
const ( // Magic array string? ARRAY = 0x5b // Indicates an [`i16`] in the byte stream I_16 = 0x81 // Indicates an [`i32`] in the byte stream I_32 = 0x82 // Indicates an [`f32`] or [`f64`] in the byte stream; the [`Type`] determines the size DECIMAL = 0x83 // Indicates the start of a new object START = 0x84 // Indicates that there is no more data to parse, for example the end of a class inheritance chain EMPTY = 0x85 // Indicates the last byte of an object END = 0x86 // Bytes equal or greater in value than the reference tag indicate an index in the table of already-seen types REFERENCE_TAG = 0x92 )
const AttachmentsQuery = `` /* 319-byte string literal not displayed */
const ChatQuery = `
SELECT COALESCE(display_name, '')
FROM chat
WHERE guid=$1
`
const ContactsQuery = `` /* 425-byte string literal not displayed */
const FITNESS_RECEIVER = "$(kIMTranscriptPluginBreadcrumbTextReceiverIdentifier)"
const GetChatIDsNames = `` /* 314-byte string literal not displayed */
const GetContactVCard = `` /* 224-byte string literal not displayed */
const GetOwnContactFirstPhone = `
tell application "Contacts"
copy value of first phone of my card as string to stdout
end tell
`
const GetOwnContactIDs = `` /* 286-byte string literal not displayed */
const GroupActionQuery = `` /* 547-byte string literal not displayed */
const GroupMemberQuery = `` /* 183-byte string literal not displayed */
const MaxMessagesRowQuery = `
SELECT MAX(ROWID) FROM message
`
const MaxMessagesTimeQuery = `
SELECT MAX(MAX(date), MAX(date_edited), MAX(date_retracted)) FROM message
`
const MessagesBetweenQuery = baseMessagesQuery + `
WHERE message.ROWID > $1 AND message.ROWID < $2
ORDER BY message.date ASC
`
const MessagesNewerThanQuery = baseMessagesQuery + `
WHERE message.date > $1 OR message.date_edited > $1 OR message.date_retracted > $1
ORDER BY COALESCE(message.date_retracted, COALESCE(message.date_edited, message.date)) ASC
`
const NewMessagesQuery = baseMessagesQuery + `
WHERE message.ROWID > $1
ORDER BY message.date ASC
`
const NewRecieptsQuery = `` /* 253-byte string literal not displayed */
const TIMESTAMP_FACTOR = 1000000000
Variables ¶
var ( ErrUnknownNormalTapbackTarget = errors.New("unrecognized formatting of normal tapback target") ErrInvalidTapbackTargetPart = errors.New("tapback target part index is invalid") ErrUnknownTapbackTargetType = errors.New("unrecognized tapback target type") )
var AppleEpoch = time.Date(2001, 1, 1, 0, 0, 0, 0, time.UTC)
var AppleEpochUnix = AppleEpoch.Unix()
var AppleEpochUnixNano = AppleEpoch.UnixNano()
Functions ¶
func ApplyTextRangeEffectToText ¶
func ApplyTextRangeEffectToText(text string, textEffect TextEffect) string
func ConvertConvertedMessageToString ¶
func ConvertConvertedMessageToString(c *bridgev2.ConvertedMessage) string
func ConvertEditToString ¶
func ConvertEditToString(c *bridgev2.ConvertedEdit) string
func ErrorToMessagePart ¶
func ErrorToMessagePart(err error) *bridgev2.ConvertedMessagePart
func FormatTextRangeEffectsOnText ¶
func FormatTextRangeEffectsOnText(text string, textRangeEffects []TextRangeEffect) string
func GetImageFromVCard ¶
func GetTextFromComponents ¶
func GetTextFromComponents(components []Archivable) *string
func GetValueAsMapFromMapKey ¶
func MakeMessagesPortalID ¶
func MakeMessagesPortalID(userLoginID networkid.UserLoginID, chatGUID string) networkid.PortalID
func NewTypedStreamDecoder ¶
func ParseFormatPhoneNumber ¶
func ReplaceHomeDirectory ¶
func SupplementChatMemberWithContactInformation ¶
func SupplementChatMemberWithContactInformation(member *bridgev2.ChatMember, contactInformation ContactInformation, contactsClient MacOSContactsClient)
func SupplementMemberMapWithContactsMap ¶
func SupplementMemberMapWithContactsMap(memberMap *map[networkid.UserID]bridgev2.ChatMember, contactsMap map[networkid.UserID]ContactInformation, contactsClient MacOSContactsClient)
func SupplementUserInfoWithContactInformation ¶
func SupplementUserInfoWithContactInformation(userInfo *bridgev2.UserInfo, contactInformation ContactInformation, contactsClient MacOSContactsClient)
Types ¶
type AnimationType ¶
type AnimationType int64
const ( Big AnimationType = 5 Small AnimationType = 11 Shake AnimationType = 9 Nod AnimationType = 8 Explode AnimationType = 12 Ripple AnimationType = 4 Bloom AnimationType = 6 Jitter AnimationType = 10 Unknown AnimationType = 0 )
type Archivable ¶
type Archivable interface {
// contains filtered or unexported methods
}
func DecodeTypedStreamComponents ¶
func DecodeTypedStreamComponents(encoded []byte) ([]Archivable, error)
type ArchivableClass ¶
type ArchivableClass struct {
Class Class
}
type ArchivableData ¶
type ArchivableData struct {
OutputData []any
}
type ArchivableObject ¶
type ArchivableObject struct {
ArchivableData
ArchivableClass
}
type ArchivablePlaceholder ¶
type ArchivablePlaceholder struct{}
type ArchivableTypes ¶
type ArchivableTypes struct {
Types []Type
}
type Archivables ¶
type Archivables interface {
ArchivablePlaceholder | ArchivableData | ArchivableClass | ArchivableObject | ArchivableTypes
}
type Attachment ¶
type Attachment struct {
GUID string
PathOnDisk string
MimeType string
FileName string
IsSticker int
StickerSource StickerSource
EmojiImageShortDescription string
}
func FilterAttachments ¶
func FilterAttachments(log *zerolog.Logger, messageAttachments []*Attachment, combinedComponents []CombinedComponent) []*Attachment
func (*Attachment) ConvertAttachmentToConvertedMessagePart ¶
func (a *Attachment) ConvertAttachmentToConvertedMessagePart(ctx context.Context, intent bridgev2.MatrixAPI, roomId id.RoomID, attachmentMeta *AttachmentMeta) *bridgev2.ConvertedMessagePart
func (*Attachment) GetMimeType ¶
func (attachment *Attachment) GetMimeType() string
func (Attachment) Read ¶
func (a Attachment) Read() (result []byte, err error)
type AttachmentMeta ¶
type AttachmentMeta struct {
GUID *string
Transcription *string
Height *float64
Width *float64
Name *string
}
func GetAttachmentMetaFromComponents ¶
func GetAttachmentMetaFromComponents(components []Archivable) *AttachmentMeta
type ClassResult ¶
type ClassResult any
type ClassResultHierarchy ¶
type ClassResultHierarchy struct {
ClassHierarchy []Archivable
}
type ClassResultIndex ¶
type ClassResultIndex struct {
Index int
}
type CombinedComponent ¶
type CombinedComponent any
func ConvertArchivablesToCombinedComponents ¶
func ConvertArchivablesToCombinedComponents(components []Archivable, componentString *string) []CombinedComponent
type CombinedComponentAttachment ¶
type CombinedComponentAttachment struct {
AttachmentMeta AttachmentMeta
}
type CombinedComponentResult ¶
type CombinedComponentResult interface{}
func GetCombinedComponent ¶
func GetCombinedComponent(components []Archivable, text string, start int, end int, charIndexTable []int) CombinedComponentResult
type CombinedComponentResultContinuation ¶
type CombinedComponentResultContinuation struct {
TextRangeEffect TextRangeEffect
}
type CombinedComponentResultNew ¶
type CombinedComponentResultNew struct {
CombinedComponent CombinedComponent
}
type CombinedComponentRetraction ¶
type CombinedComponentRetraction struct{}
type CombinedComponentText ¶
type CombinedComponentText struct {
TextRangeEffects []TextRangeEffect
}
type ComponentTypeKey ¶
type ComponentTypeKey string
const ( FileTransferGUIDAttributeName ComponentTypeKey = "__kIMFileTransferGUIDAttributeName" AudioTranscription ComponentTypeKey = "IMAudioTranscription" InlineMediaHeightAttributeName ComponentTypeKey = "__kIMInlineMediaHeightAttributeName" InlineMediaWidthAttributeName ComponentTypeKey = "__kIMInlineMediaWidthAttributeName" FilenameAttributeName ComponentTypeKey = "__kIMFilenameAttributeName" MentionConfirmedMention ComponentTypeKey = "__kIMMentionConfirmedMention" LinkAttributeName ComponentTypeKey = "__kIMLinkAttributeName" OneTimeCodeAttributeName ComponentTypeKey = "__kIMOneTimeCodeAttributeName" CalendarEventAttributeName ComponentTypeKey = "__kIMCalendarEventAttributeName" TextBoldAttributeName ComponentTypeKey = "__kIMTextBoldAttributeName" TextUnderlineAttributeName ComponentTypeKey = "__kIMTextUnderlineAttributeName" TextItalicAttributeName ComponentTypeKey = "__kIMTextItalicAttributeName" TextStrikethroughAttributeName ComponentTypeKey = "__kIMTextStrikethroughAttributeName" TextEffectAttributeName ComponentTypeKey = "__kIMTextEffectAttributeName" )
type ContactInformation ¶
type ContactsDB ¶
type ContactsDB struct {
// contains filtered or unexported fields
}
type ConversionType ¶
type ConversionType int
const ( ConversionTypeCurrency ConversionType = iota ConversionTypeDistance ConversionTypeTemperature ConversionTypeTimezone ConversionTypeVolume ConversionTypeWeight )
type EditedEvent ¶
type EditedEvent struct {
Date int64
Text *string
Components []Archivable
GUID *string
}
type EditedMessagePart ¶
type EditedMessagePart struct {
Status EditedMessageStatus
EditHistory []EditedEvent
}
func EditedMessagePartsFromMessageSummaryInfo ¶
func EditedMessagePartsFromMessageSummaryInfo(messageSummaryInfo []byte) ([]*EditedMessagePart, error)
type EditedMessageStatus ¶
type EditedMessageStatus int
const ( EditedMessageStatusEdited EditedMessageStatus = iota EditedMessageStatusUnsent EditedMessageStatusOriginal )
func (EditedMessageStatus) String ¶
func (s EditedMessageStatus) String() string
type GroupActionType ¶
type GroupActionType int
const ( GroupActionAddUser GroupActionType = 0 GroupActionRemoveUser GroupActionType = 1 GroupActionSetAvatar GroupActionType = 1 GroupActionRemoveAvatar GroupActionType = 2 )
type Identifier ¶
func ParseIdentifier ¶
func ParseIdentifier(identifier string) Identifier
func (Identifier) String ¶
func (id Identifier) String() string
type MacOSContactsClient ¶
type MacOSContactsClient struct {
// contains filtered or unexported fields
}
func GetContactsClient ¶
func GetContactsClient(userName string) (*MacOSContactsClient, error)
func (MacOSContactsClient) GetContactUserInfo ¶
func (c MacOSContactsClient) GetContactUserInfo(id string) (*bridgev2.UserInfo, error)
func (MacOSContactsClient) GetContactsMap ¶
func (c MacOSContactsClient) GetContactsMap() (map[networkid.UserID]ContactInformation, error)
func (MacOSContactsClient) GetWrappedAvatarForID ¶
func (c MacOSContactsClient) GetWrappedAvatarForID(ID string) *bridgev2.Avatar
func (MacOSContactsClient) ValidateConnection ¶
func (c MacOSContactsClient) ValidateConnection() error
type MacOSMessagesClient ¶
type MacOSMessagesClient struct {
// contains filtered or unexported fields
}
func GetMessagesClient ¶
func GetMessagesClient(userName string, logger *zerolog.Logger) (*MacOSMessagesClient, error)
func (*MacOSMessagesClient) GetAllChatIDsNames ¶
func (c *MacOSMessagesClient) GetAllChatIDsNames() (map[string]string, error)
func (MacOSMessagesClient) GetChatDBPath ¶
func (c MacOSMessagesClient) GetChatDBPath() string
func (*MacOSMessagesClient) GetChatDetails ¶
func (MacOSMessagesClient) GetChatMemberMap ¶
func (c MacOSMessagesClient) GetChatMemberMap(chatID networkid.PortalID, selfUserID networkid.UserID) (map[networkid.UserID]bridgev2.ChatMember, error)
func (*MacOSMessagesClient) GetMaxMessagesRow ¶
func (c *MacOSMessagesClient) GetMaxMessagesRow() (*int, error)
func (*MacOSMessagesClient) GetMaxMessagesTime ¶
func (c *MacOSMessagesClient) GetMaxMessagesTime() (*int64, error)
func (*MacOSMessagesClient) GetMessagesAboveRowID ¶
func (c *MacOSMessagesClient) GetMessagesAboveRowID(rowID int) ([]*Message, error)
func (*MacOSMessagesClient) GetMessagesBetween ¶
func (c *MacOSMessagesClient) GetMessagesBetween(minRowID int, maxRowID int) ([]*Message, error)
func (*MacOSMessagesClient) GetMessagesNewerThan ¶
func (c *MacOSMessagesClient) GetMessagesNewerThan(t int64) ([]*Message, error)
func (*MacOSMessagesClient) GetReadReceiptsSince ¶
func (c *MacOSMessagesClient) GetReadReceiptsSince(minDate time.Time) ([]*ReadReceipt, time.Time, error)
func (MacOSMessagesClient) ValidateConnection ¶
func (c MacOSMessagesClient) ValidateConnection() error
type Message ¶
type Message struct {
RowID int
ReplyToPart int
Date int64
DateRead int64
DateEdited int64
DateRetracted int64
IsSent bool
IsFromMe bool
IsDelivered bool
IsEmote bool
IsAudioMessage bool
IsRead bool
IsEdited bool
IsRetracted bool
GUID string
Subject string
Text string
AttributedBodyText string
ChatGUID string
ReplyToGUID string
ThreadID string
NewGroupName string
BalloonBundleID string
Sender Identifier
Target Identifier
GroupActionType GroupActionType
ItemType ItemType
CreatedAt time.Time
ReadAt time.Time
EditedAt time.Time
RetractedAt time.Time
Attachments []*Attachment
Components []Archivable
CombinedComponents []CombinedComponent
EditedMessageParts []*EditedMessagePart
Tapback *Tapback
}
func (*Message) ConvertAppMessageToMessagePart ¶
func (m *Message) ConvertAppMessageToMessagePart() *bridgev2.ConvertedMessagePart
func (*Message) ConvertAttributesToMessagePart ¶
func (m *Message) ConvertAttributesToMessagePart(attributes []TextRangeEffect, index int) *bridgev2.ConvertedMessagePart
func (*Message) ConvertEditedMessagePart ¶
func (m *Message) ConvertEditedMessagePart(componentIndex int) *bridgev2.ConvertedMessagePart
func (*Message) ConvertMessageText ¶
func (m *Message) ConvertMessageText() *bridgev2.ConvertedMessagePart
func (*Message) ConvertMessageToParts ¶
func (*Message) IsPartEdited ¶
type MockMatrixAPI ¶
type MockMatrixAPI struct{}
func (*MockMatrixAPI) CreateRoom ¶
func (m *MockMatrixAPI) CreateRoom(ctx context.Context, req *mautrix.ReqCreateRoom) (id.RoomID, error)
CreateRoom implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) DeleteRoom ¶
DeleteRoom implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) DownloadMedia ¶
func (m *MockMatrixAPI) DownloadMedia(ctx context.Context, uri id.ContentURIString, file *event.EncryptedFileInfo) ([]byte, error)
DownloadMedia implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) DownloadMediaToFile ¶
func (m *MockMatrixAPI) DownloadMediaToFile(ctx context.Context, uri id.ContentURIString, file *event.EncryptedFileInfo, writable bool, callback func(*os.File) error) error
DownloadMediaToFile implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) EnsureInvited ¶
func (m *MockMatrixAPI) EnsureInvited(ctx context.Context, roomID id.RoomID, userID id.UserID) error
EnsureInvited implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) EnsureJoined ¶
EnsureJoined implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) GetMXID ¶
func (m *MockMatrixAPI) GetMXID() id.UserID
GetMXID implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) IsDoublePuppet ¶
func (m *MockMatrixAPI) IsDoublePuppet() bool
IsDoublePuppet implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) MarkRead ¶
func (m *MockMatrixAPI) MarkRead(ctx context.Context, roomID id.RoomID, eventID id.EventID, ts time.Time) error
MarkRead implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) MarkTyping ¶
func (m *MockMatrixAPI) MarkTyping(ctx context.Context, roomID id.RoomID, typingType bridgev2.TypingType, timeout time.Duration) error
MarkTyping implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) MarkUnread ¶
MarkUnread implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) SendMessage ¶
func (m *MockMatrixAPI) SendMessage(ctx context.Context, roomID id.RoomID, eventType event.Type, content *event.Content, extra *bridgev2.MatrixSendExtra) (*mautrix.RespSendEvent, error)
SendMessage implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) SendState ¶
func (m *MockMatrixAPI) SendState(ctx context.Context, roomID id.RoomID, eventType event.Type, stateKey string, content *event.Content, ts time.Time) (*mautrix.RespSendEvent, error)
SendState implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) SetAvatarURL ¶
func (m *MockMatrixAPI) SetAvatarURL(ctx context.Context, avatarURL id.ContentURIString) error
SetAvatarURL implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) SetDisplayName ¶
func (m *MockMatrixAPI) SetDisplayName(ctx context.Context, name string) error
SetDisplayName implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) SetExtraProfileMeta ¶
func (m *MockMatrixAPI) SetExtraProfileMeta(ctx context.Context, data any) error
SetExtraProfileMeta implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) TagRoom ¶
func (m *MockMatrixAPI) TagRoom(ctx context.Context, roomID id.RoomID, tag event.RoomTag, isTagged bool) error
TagRoom implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) UploadMedia ¶
func (m *MockMatrixAPI) UploadMedia(ctx context.Context, roomID id.RoomID, data []byte, fileName string, mimeType string) (url id.ContentURIString, file *event.EncryptedFileInfo, err error)
UploadMedia implements bridgev2.MatrixAPI.
func (*MockMatrixAPI) UploadMediaStream ¶
func (m *MockMatrixAPI) UploadMediaStream(ctx context.Context, roomID id.RoomID, size int64, requireFile bool, cb bridgev2.FileStreamCallback) (url id.ContentURIString, file *event.EncryptedFileInfo, err error)
UploadMediaStream implements bridgev2.MatrixAPI.
type OutputDataTypes ¶
type OutputDataTypes interface {
*string | *int64 | *uint64 | *float32 | *float64 | *byte | *[]byte | *Class
}
Not all these types are used? (*float32, *byte, *[]byte)
type ReadReceipt ¶
type StickerSource ¶
type StickerSource string
const ( StickerSourceNone StickerSource = "" StickerSourceGenmoji StickerSource = "com.apple.messages.genmoji" StickerSourceAnimoji StickerSource = "com.apple.Animoji.StickersApp.MessagesExtension" StickerSourceAnimojiJellyfish StickerSource = "com.apple.Jellyfish.Animoji" StickerSourceUserGenerated StickerSource = "com.apple.Stickers.UserGenerated.MessagesExtension" )
type Style ¶
type Style int
func ResolveStyles ¶
func ResolveStyles(components []Archivable) []Style
type Tapback ¶
type Tapback struct {
TargetGUID string
Type TapbackType
Remove bool
TargetPart int
Emoji string
}
type TapbackType ¶
type TapbackType int
const ( TapbackLove TapbackType = iota + 2000 TapbackLike TapbackDislike TapbackLaugh TapbackEmphasis TapbackQuestion TapbackEmoji TapbackSticker TapbackRemoveOffset = 1000 )
type TextEffect ¶
type TextEffect any
type TextEffectAnimation ¶
type TextEffectAnimation struct {
Animation AnimationType
}
type TextEffectConversion ¶
type TextEffectConversion struct {
Conversion ConversionType
}
type TextEffectDefault ¶
type TextEffectDefault struct{}
type TextEffectLink ¶
type TextEffectLink struct {
Link string
}
type TextEffectMention ¶
type TextEffectMention struct {
Mention string
}
type TextEffectOTP ¶
type TextEffectOTP struct{}
type TextEffectStyles ¶
type TextEffectStyles struct {
Styles []Style
}
type TextEffects ¶
type TextEffects interface {
TextEffectMention | TextEffectLink | TextEffectStyles | TextEffectAnimation | TextEffectConversion | TextEffectOTP | TextEffectDefault
}
type TextRangeEffect ¶
type TextRangeEffect struct {
Start int
End int
TextEffect TextEffect
}
type Type ¶
type Type struct {
Variant TypeVariant
StringValue string
ArraySize int
UnknownValue byte
}
func ByteToType ¶
type TypeVariant ¶
type TypeVariant int
const ( TypeUtf8String TypeVariant = iota TypeEmbeddedData TypeObject TypeSignedInt TypeUnsignedInt TypeFloat TypeDouble TypeString TypeArray TypeUnknown )