groupsv2

package
v0.0.0-...-1250840 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 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

func CreateGroupChangeFromGroupActions(actions []byte) []byte

func CreatePromotePendingMemberAction

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

func CreateRequestForGroup

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

func GetGroupAuthCredentials

func GetGroupAuthCredentials(startDay int64, endDay int64) error

func GroupInviteLinkUrl

func GroupInviteLinkUrl()

func GroupLinkPassword

func GroupLinkPassword()

func PatchGroupV2

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

func SetupGroups

func SetupGroups(path string) error

Types

type GroupCredential

type GroupCredential struct {
	Credential     []byte
	RedemptionTime int64
}

func GetCredentialForRedemption

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

func GetCredentialForToday

func GetCredentialForToday() (*GroupCredential, error)

type GroupCredentials

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

type GroupV2

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

func FindGroup(hexid string) *GroupV2

func HandleGroupsV2

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

func (*GroupV2) CheckJoinStatus

func (g *GroupV2) CheckJoinStatus() error

todo handle group join requests via link

func (*GroupV2) UpdateGroupFromServer

func (g *GroupV2) UpdateGroupFromServer() error

type GroupV2MessageContext

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