commit 264d2187bbc739ec9af82bd313ca138f80f4b2e3
parent a44bb8784bd13789a69b8ab9e1a04e7828588488
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 22 Aug 2017 20:29:50 +0200
Move struct to correct place
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/matrix/ownUser.go b/matrix/ownUser.go
@@ -11,11 +11,6 @@ import (
var localLog *log.Logger
-// RespUserDisplayName is the Response type of getUserDisplayName()
-type RespUserDisplayName struct {
- DisplayName string `json:"displayname"`
-}
-
// getUserDisplayName returns the Dispaly name to a MXID
func getUserDisplayName(mxid string, cli *Client) (resp *RespUserDisplayName, err error) {
urlPath := cli.BuildURL("profile", mxid, "displayname")
diff --git a/matrix/types.go b/matrix/types.go
@@ -9,6 +9,11 @@ type Client struct {
*gomatrix.Client
}
+// RespUserDisplayName is the Response type of getUserDisplayName()
+type RespUserDisplayName struct {
+ DisplayName string `json:"displayname"`
+}
+
// GetUserDisplayName returns the Dispaly name to a MXID
func (cli *Client) GetUserDisplayName(mxid string) (resp *RespUserDisplayName, err error) {
resp, err = getUserDisplayName(mxid, cli)