summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/libsignal/protocol/SenderKeyName.go
blob: d9b6b6843b829d75ebb02426aa30b85384855840 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package protocol

// NewSenderKeyName returns a new SenderKeyName object.
func NewSenderKeyName(groupID string, sender *SignalAddress) *SenderKeyName {
	return &SenderKeyName{
		groupID: groupID,
		sender:  sender,
	}
}

// SenderKeyName is a structure for a group session address.
type SenderKeyName struct {
	groupID string
	sender  *SignalAddress
}

// GroupID returns the sender key group id
func (n *SenderKeyName) GroupID() string {
	return n.groupID
}

// Sender returns the Signal address of sending user in the group.
func (n *SenderKeyName) Sender() *SignalAddress {
	return n.sender
}