groupsv2

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: GPL-3.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GroupV2JoinsStatusMember  = 0
	GroupV2JoinsStatusInvite  = 1
	GroupV2JoinsStatusRequest = 2
	GroupV2JoinsStatusRemoved = 3
)
View Source
const (
	GROUPSV2_CREDENTIAL = "/v1/certificate/group/%d/%d"
)
View Source
const GROUPSV2_GROUP = "/v1/groups/"
View Source
const GROUPSV2_GROUP_JOIN = "/v1/groups/join/%s"
View Source
const HIGHEST_KNOWN_EPOCH = 1
View Source
const ZKGROUP_SERVER_PUBLIC_PARAMS = "" /* 216-byte string literal not displayed */

Variables

This section is empty.

Functions

func CreateGroupChangeFromGroupActions added in v1.3.0

func CreateGroupChangeFromGroupActions(actions []byte) []byte

func CreatePromotePendingMemberAction added in v1.3.0

func CreatePromotePendingMemberAction(uuid []byte, group string) []byte

func CreateRequestForGroup added in v1.3.0

func CreateRequestForGroup(gID string, uuid []byte) *signalservice.GroupChange_Actions

func GetGroupAuthCredentials added in v1.3.0

func GetGroupAuthCredentials(startDay int64, endDay int64) error

func GroupInviteLinkUrl added in v1.3.0

func GroupInviteLinkUrl()

func GroupLinkPassword added in v1.3.0

func GroupLinkPassword()

func PatchGroupV2 added in v1.3.0

func PatchGroupV2(groupActions *signalservice.GroupChange_Actions,
	groupsV2Authorization *GroupsV2Authorization) error

func SetupGroups added in v1.3.0

func SetupGroups(path string) error

Types

type GroupCredential added in v1.3.0

type GroupCredential struct {
	Credential     []byte
	RedemptionTime int64
}

func GetCredentialForRedemption added in v1.3.0

func GetCredentialForRedemption(day int64) (*GroupCredential, error)

func GetCredentialForToday added in v1.3.0

func GetCredentialForToday() (*GroupCredential, error)

type GroupCredentials added in v1.3.0

type GroupCredentials struct {
	Credentials []GroupCredential `json:"credentials"`
}
var Credentials *GroupCredentials

type GroupV2 added in v1.3.0

type GroupV2 struct {
	MasterKey    []byte
	Hexid        string
	GroupContext signalservice.Group

	DecryptedGroup *signalservice.DecryptedGroup
	GroupAction    *signalservice.DecryptedGroupChange
	JoinStatus     int
	// contains filtered or unexported fields
}

GroupV2 holds group metadata.

func FindGroup added in v1.3.0

func FindGroup(hexid string) *GroupV2

func HandleGroupsV2 added in v1.3.0

func HandleGroupsV2(src string, dm *signalservice.DataMessage) (*GroupV2, error)

func (*GroupV2) CheckJoinStatus added in v1.3.0

func (g *GroupV2) CheckJoinStatus() error

todo handle group join requests via link

func (*GroupV2) UpdateGroupFromServer added in v1.3.0

func (g *GroupV2) UpdateGroupFromServer() error

type GroupV2MessageContext added in v1.3.0

type GroupV2MessageContext struct {
	MasterKey   []byte // Masterkey is the unique identifier
	Revision    uint32 // holds the current revision number, if mismatch fetch the steps in between
	GroupChange []byte // protobuf of signalservice.GroupChange
}

GroupV2Message defines a group v2 message type

type GroupsV2Authorization

type GroupsV2Authorization struct {
	Username string
	Password string
}

func NewGroupsV2Authorization

func NewGroupsV2Authorization(uuid []byte, groupSecretParams zkgroup.GroupSecretParams) (*GroupsV2Authorization, error)

func NewGroupsV2AuthorizationForGroup

func NewGroupsV2AuthorizationForGroup(uuid []byte, hexid string) (*GroupsV2Authorization, error)

Jump to

Keyboard shortcuts

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