summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/matterbridge/gomatrix/identifier.go
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-10-27 07:08:25 -0500
committermsglm <msglm@techchud.xyz>2023-10-27 07:08:25 -0500
commit032a7e0c1188d3507b8d9a9571f2446a43cf775b (patch)
tree2bd38c01bc7761a6195e426082ce7191ebc765a1 /vendor/github.com/matterbridge/gomatrix/identifier.go
parent56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 (diff)
downloadmatterbridge-msglm-1.26.0+0.1.0.tar.gz
matterbridge-msglm-1.26.0+0.1.0.tar.bz2
matterbridge-msglm-1.26.0+0.1.0.zip
apply https://github.com/42wim/matterbridge/pull/1864v1.26.0+0.1.0
Diffstat (limited to 'vendor/github.com/matterbridge/gomatrix/identifier.go')
-rw-r--r--vendor/github.com/matterbridge/gomatrix/identifier.go69
1 files changed, 0 insertions, 69 deletions
diff --git a/vendor/github.com/matterbridge/gomatrix/identifier.go b/vendor/github.com/matterbridge/gomatrix/identifier.go
deleted file mode 100644
index 4a61d080..00000000
--- a/vendor/github.com/matterbridge/gomatrix/identifier.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package gomatrix
-
-// Identifier is the interface for https://matrix.org/docs/spec/client_server/r0.6.0#identifier-types
-type Identifier interface {
- // Returns the identifier type
- // https://matrix.org/docs/spec/client_server/r0.6.0#identifier-types
- Type() string
-}
-
-// UserIdentifier is the Identifier for https://matrix.org/docs/spec/client_server/r0.6.0#matrix-user-id
-type UserIdentifier struct {
- IDType string `json:"type"` // Set by NewUserIdentifer
- User string `json:"user"`
-}
-
-// Type implements the Identifier interface
-func (i UserIdentifier) Type() string {
- return "m.id.user"
-}
-
-// NewUserIdentifier creates a new UserIdentifier with IDType set to "m.id.user"
-func NewUserIdentifier(user string) UserIdentifier {
- return UserIdentifier{
- IDType: "m.id.user",
- User: user,
- }
-}
-
-// ThirdpartyIdentifier is the Identifier for https://matrix.org/docs/spec/client_server/r0.6.0#third-party-id
-type ThirdpartyIdentifier struct {
- IDType string `json:"type"` // Set by NewThirdpartyIdentifier
- Medium string `json:"medium"`
- Address string `json:"address"`
-}
-
-// Type implements the Identifier interface
-func (i ThirdpartyIdentifier) Type() string {
- return "m.id.thirdparty"
-}
-
-// NewThirdpartyIdentifier creates a new UserIdentifier with IDType set to "m.id.user"
-func NewThirdpartyIdentifier(medium, address string) ThirdpartyIdentifier {
- return ThirdpartyIdentifier{
- IDType: "m.id.thirdparty",
- Medium: medium,
- Address: address,
- }
-}
-
-// PhoneIdentifier is the Identifier for https://matrix.org/docs/spec/client_server/r0.6.0#phone-number
-type PhoneIdentifier struct {
- IDType string `json:"type"` // Set by NewPhoneIdentifier
- Country string `json:"country"`
- Phone string `json:"phone"`
-}
-
-// Type implements the Identifier interface
-func (i PhoneIdentifier) Type() string {
- return "m.id.phone"
-}
-
-// NewPhoneIdentifier creates a new UserIdentifier with IDType set to "m.id.user"
-func NewPhoneIdentifier(country, phone string) PhoneIdentifier {
- return PhoneIdentifier{
- IDType: "m.id.phone",
- Country: country,
- Phone: phone,
- }
-}