Documentation ¶
Index ¶
- Constants
- func MakeFakeMessageID(chat, sender types.JID, data string) networkid.MessageID
- func MakeMediaID(messageInfo *types.MessageInfo, receiver networkid.UserLoginID) networkid.MediaID
- func MakeMessageID(chat, sender types.JID, id types.MessageID) networkid.MessageID
- func MakePortalID(jid types.JID) networkid.PortalID
- func MakeUserID(user types.JID) networkid.UserID
- func MakeUserLoginID(user types.JID) networkid.UserLoginID
- func ParsePortalID(portal networkid.PortalID) (types.JID, error)
- func ParseUserID(user networkid.UserID) types.JID
- func ParseUserLoginID(user networkid.UserLoginID, deviceID uint16) types.JID
- type GhostMetadata
- type GroupInviteMeta
- type MessageErrorType
- type MessageMetadata
- type ParsedMessageID
- type PortalMetadata
- type PushKeys
- type ReactionMetadata
- type UserLoginMetadata
Constants ¶
View Source
const LIDPrefix = "lid-"
Variables ¶
This section is empty.
Functions ¶
func MakeFakeMessageID ¶
func MakeMediaID ¶ added in v0.11.1
func MakeMediaID(messageInfo *types.MessageInfo, receiver networkid.UserLoginID) networkid.MediaID
func MakeMessageID ¶
func MakeUserLoginID ¶
func MakeUserLoginID(user types.JID) networkid.UserLoginID
func ParseUserLoginID ¶
func ParseUserLoginID(user networkid.UserLoginID, deviceID uint16) types.JID
Types ¶
type GhostMetadata ¶
type GroupInviteMeta ¶
type MessageErrorType ¶
type MessageErrorType string
const ( MsgNoError MessageErrorType = "" MsgErrDecryptionFailed MessageErrorType = "decryption_failed" MsgErrMediaNotFound MessageErrorType = "media_not_found" )
type MessageMetadata ¶
type MessageMetadata struct { SenderDeviceID uint16 `json:"sender_device_id,omitempty"` Error MessageErrorType `json:"error,omitempty"` BroadcastListJID *types.JID `json:"broadcast_list_jid,omitempty"` GroupInvite *GroupInviteMeta `json:"group_invite,omitempty"` FailedMediaMeta json.RawMessage `json:"media_meta,omitempty"` DirectMediaMeta json.RawMessage `json:"direct_media_meta,omitempty"` IsMatrixPoll bool `json:"is_matrix_poll,omitempty"` }
type ParsedMessageID ¶
func ParseMediaID ¶ added in v0.11.1
func ParseMediaID(mediaID networkid.MediaID) (*ParsedMessageID, networkid.UserLoginID, error)
func ParseMessageID ¶
func ParseMessageID(messageID networkid.MessageID) (*ParsedMessageID, error)
func (*ParsedMessageID) String ¶ added in v0.11.1
func (pmi *ParsedMessageID) String() networkid.MessageID
type PortalMetadata ¶
type ReactionMetadata ¶
type ReactionMetadata struct {
SenderDeviceID uint16 `json:"sender_device_id,omitempty"`
}
type UserLoginMetadata ¶
type UserLoginMetadata struct { WADeviceID uint16 `json:"wa_device_id"` PhoneLastSeen jsontime.Unix `json:"phone_last_seen"` PhoneLastPinged jsontime.Unix `json:"phone_last_pinged"` Timezone string `json:"timezone"` PushKeys *PushKeys `json:"push_keys,omitempty"` HistorySyncPortalsNeedCreating bool `json:"history_sync_portals_need_creating,omitempty"` }
func (*UserLoginMetadata) GeneratePushKeys ¶
func (m *UserLoginMetadata) GeneratePushKeys()
Click to show internal directories.
Click to hide internal directories.