contacts

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: GPL-3.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Contacts = map[string]Contact{}
)

Functions

func LoadContacts

func LoadContacts(contactsYaml *yamlContacts)

LoadContacts reads a YAML contacts file

func UpdateProfileKey added in v1.3.2

func UpdateProfileKey(src string, profileKey []byte) error

func WriteContacts

func WriteContacts(filename string, contacts []Contact) error

WriteContacts saves a list of contacts to a file

func WriteContactsToPath

func WriteContactsToPath() error

WriteContactsToPath saves a list of contacts to a file at the standard location

Types

type Contact

type Contact struct {
	UUID                 string
	Tel                  string
	ProfileKey           []byte
	ProfileKeyCredential []byte
	IdentityKey          []byte
	Name                 string
	Username             string
	AvatarImg            []byte
	Avatar               []byte
	HasAvatar            bool
	Color                string
	Blocked              bool
	Verified             *signalservice.Verified
	ExpireTimer          uint32
	InboxPosition        uint32
	Archived             bool
	Certificate          []byte
	Registered           bool
	About                string
	AboutEmoji           string
}

Contact contains information about a contact.

func GetContact added in v1.3.8

func GetContact(uuid string) Contact

func ReadContacts

func ReadContacts(fileName string) ([]Contact, error)

ReadContacts loads the contacts yaml file and pareses it

func (*Contact) GetProfileKey added in v1.3.8

func (c *Contact) GetProfileKey() []byte

Jump to

Keyboard shortcuts

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