Documentation ¶
Index ¶
- Variables
- type Attachment
- type ChatDeleted
- type ChatIdentifier
- type ChatInfo
- type Contact
- type GroupActionType
- type GroupInfoChange
- type IMessageWithSender
- type Identifier
- type ItemType
- type MarkUnread
- type Message
- type MessageEdit
- type MessagePart
- type MessagePartInfo
- type MessageUnsend
- type ParsedThreadRoot
- type ReadReceipt
- type RichLinkAsset
- type RichLinkAssetSize
- type RichLinkAssetSource
- type RichLinkMetadata
- type SendMessageStatus
- type Service
- type Tapback
- type TapbackType
- type TypingNotification
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { PartInfo MessagePartInfo Downloader *ids.AttachmentDownloader InlineData []byte FileSize int FileName string MimeType string UTIType string }
type ChatDeleted ¶
type ChatIdentifier ¶
type Contact ¶
type Contact struct { FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Nickname string `json:"nickname,omitempty"` Avatar []byte `json:"avatar,omitempty"` Phones []string `json:"phones,omitempty"` Emails []string `json:"emails,omitempty"` UserGUID string `json:"user_guid,omitempty"` PrimaryIdentifier string `json:"primary_identifier,omitempty"` }
type GroupActionType ¶
type GroupActionType int
const ( GroupActionAddUser GroupActionType = 0 GroupActionRemoveUser GroupActionType = 1 GroupActionSetAvatar GroupActionType = 1 GroupActionRemoveAvatar GroupActionType = 2 )
type GroupInfoChange ¶
type GroupInfoChange struct { ID uuid.UUID PropertiesVersion int GroupID string Chat uri.ParsedURI Sender uri.ParsedURI IsFromMe bool Time time.Time OldName string NewName string RemoveAvatar bool AvatarFileTransferGUID *string NewAvatar *ids.AttachmentDownloader OldParticipants []uri.ParsedURI NewParticipants []uri.ParsedURI }
func (*GroupInfoChange) GetIsFromMe ¶
func (g *GroupInfoChange) GetIsFromMe() bool
func (*GroupInfoChange) GetSender ¶
func (g *GroupInfoChange) GetSender() uri.ParsedURI
type IMessageWithSender ¶
type Identifier ¶
func ParseIdentifier ¶
func ParseIdentifier(guid string) Identifier
func (Identifier) String ¶
func (id Identifier) String() string
type MarkUnread ¶
type Message ¶
type Message struct { GroupID string `json:"group_id,omitempty"` ID uuid.UUID `json:"id"` Time time.Time `json:"-"` Subject string `json:"subject"` Text string `json:"text"` HTML string `json:"html"` TextPart *MessagePartInfo `json:"text_part"` Chat uri.ParsedURI `json:"chat"` Sender uri.ParsedURI `json:"-"` EffectID string `json:"-"` Receiver uri.ParsedURI `json:"-"` Service Service `json:"service"` IsFromMe bool `json:"is_from_me"` IsAudioMessage bool `json:"is_audio_message"` ThreadRoot *ParsedThreadRoot `json:"thread_originator,omitempty"` Tapback *Tapback `json:"associated_message,omitempty"` Attachments []*Attachment `json:"attachments,omitempty"` GroupName string Participants []uri.ParsedURI `json:"participants,omitempty"` RichLink *RichLinkMetadata `json:"rich_link,omitempty"` }
func (*Message) GetIsFromMe ¶
func (*Message) SenderText ¶
type MessageEdit ¶
type MessageEdit struct { Sender uri.ParsedURI IsFromMe bool Timestamp time.Time EditMessageID uuid.UUID EditPartIndex int Text string EditID uuid.UUID RichLink *RichLinkMetadata }
func (*MessageEdit) GetIsFromMe ¶
func (m *MessageEdit) GetIsFromMe() bool
func (*MessageEdit) GetSender ¶
func (m *MessageEdit) GetSender() uri.ParsedURI
type MessagePart ¶
type MessagePartInfo ¶
type MessageUnsend ¶
type MessageUnsend struct { Sender uri.ParsedURI IsFromMe bool Timestamp time.Time UnsendMessageID uuid.UUID UnsendPartIndex int UnsendID uuid.UUID }
func (*MessageUnsend) GetIsFromMe ¶
func (m *MessageUnsend) GetIsFromMe() bool
func (*MessageUnsend) GetSender ¶
func (m *MessageUnsend) GetSender() uri.ParsedURI
type ParsedThreadRoot ¶
type ParsedThreadRoot struct { MessagePartInfo ID uuid.UUID `json:"uuid"` }
func ParseThreadRoot ¶
func ParseThreadRoot(tr string) (ptr ParsedThreadRoot, err error)
func (ParsedThreadRoot) String ¶
func (ptr ParsedThreadRoot) String() string
type ReadReceipt ¶
type RichLinkAsset ¶
type RichLinkAsset struct { MimeType string `json:"mime_type,omitempty"` Source *RichLinkAssetSource `json:"source,omitempty"` Size *RichLinkAssetSize `json:"size,omitempty"` }
type RichLinkAssetSize ¶
type RichLinkAssetSource ¶
type RichLinkMetadata ¶
type RichLinkMetadata struct { OriginalURL string `json:"original_url,omitempty"` URL string `json:"url,omitempty"` Title string `json:"title,omitempty"` Summary string `json:"summary,omitempty"` SelectedText string `json:"selected_text,omitempty"` ItemType string `json:"item_type,omitempty"` Icon *RichLinkAsset `json:"icon,omitempty"` Image *RichLinkAsset `json:"image,omitempty"` }
type SendMessageStatus ¶
type Tapback ¶
type Tapback struct { TargetGUIDString string `json:"-"` TargetGUID uuid.UUID `json:"target_guid"` TargetPart int `json:"-"` PartInfo MessagePartInfo `json:"-"` Remove bool `json:"-"` Type TapbackType `json:"type"` }
type TapbackType ¶
type TapbackType int
const ( TapbackLove TapbackType = iota + 2000 TapbackLike TapbackDislike TapbackLaugh TapbackEmphasis TapbackQuestion TapbackRemoveOffset = 1000 )
func TapbackFromEmoji ¶
func TapbackFromEmoji(emoji string) TapbackType
func (TapbackType) ActionString ¶
func (tt TapbackType) ActionString(target string) string
func (TapbackType) Emoji ¶
func (tt TapbackType) Emoji() string
func (TapbackType) Redacted ¶
func (tt TapbackType) Redacted(redact bool) int
func (TapbackType) String ¶
func (tt TapbackType) String() string
type TypingNotification ¶
Click to show internal directories.
Click to hide internal directories.