metaid

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageIDPrefixFB = "fb"
	MessageIDPrefixWA = "wa"
)

Variables

This section is empty.

Functions

func MakeFBMessageID

func MakeFBMessageID(messageID string) networkid.MessageID

func MakeFBPortalID

func MakeFBPortalID(portal int64) networkid.PortalID

func MakeMessageID

func MakeMessageID(parsed ParsedMessageID) networkid.MessageID

func MakeMessagePartID

func MakeMessagePartID(i int) networkid.PartID

func MakeUserID

func MakeUserID(user int64) networkid.UserID

func MakeUserLoginID

func MakeUserLoginID(user int64) networkid.UserLoginID

func MakeWAMessageID

func MakeWAMessageID(chat, sender types.JID, id types.MessageID) networkid.MessageID

func MakeWAPortalID

func MakeWAPortalID(jid types.JID) networkid.PortalID

func MakeWAUserID

func MakeWAUserID(jid types.JID) networkid.UserID

func ParseFBPortalID

func ParseFBPortalID(portal networkid.PortalID) int64

func ParseIDFromString

func ParseIDFromString(id string) (int64, error)

func ParseUserID

func ParseUserID(user networkid.UserID) int64

func ParseUserLoginID

func ParseUserLoginID(user networkid.UserLoginID) int64

func ParseWAPortalID

func ParseWAPortalID(portal networkid.PortalID, server string) types.JID

Types

type GhostMetadata

type GhostMetadata struct {
	Username string `json:"username,omitempty"`
}

type MessageMetadata

type MessageMetadata struct {
	EditTimestamp int64 `json:"edit_timestamp,omitempty"`
}

type ParsedFBMessageID

type ParsedFBMessageID struct {
	ID string
}

func (ParsedFBMessageID) String

func (p ParsedFBMessageID) String() string

type ParsedMessageID

type ParsedMessageID interface {
	String() string
	// contains filtered or unexported methods
}

func ParseMessageID

func ParseMessageID(messageID networkid.MessageID) ParsedMessageID

type ParsedWAMessageID

type ParsedWAMessageID struct {
	Chat   types.JID
	Sender types.JID
	ID     types.MessageID
}

func (ParsedWAMessageID) String

func (p ParsedWAMessageID) String() string

type PortalMetadata

type PortalMetadata struct {
	ThreadType     table.ThreadType `json:"thread_type"`
	WhatsAppServer string           `json:"whatsapp_server,omitempty"`

	FetchAttempted atomic.Bool `json:"-"`
}

func (*PortalMetadata) JID

type PushKeys added in v0.4.1

type PushKeys struct {
	P256DH  []byte `json:"p256dh"`
	Auth    []byte `json:"auth"`
	Private []byte `json:"private"`
}

type UserLoginMetadata

type UserLoginMetadata struct {
	Platform   types.Platform   `json:"platform"`
	Cookies    *cookies.Cookies `json:"cookies"`
	WADeviceID uint16           `json:"wa_device_id,omitempty"`
	PushKeys   *PushKeys        `json:"push_keys,omitempty"`
}

func (*UserLoginMetadata) GeneratePushKeys added in v0.4.1

func (m *UserLoginMetadata) GeneratePushKeys()

Jump to

Keyboard shortcuts

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