diff --git a/internal/matrix/client.go b/internal/matrix/client.go index 8c9aa1d..5edc6d3 100644 --- a/internal/matrix/client.go +++ b/internal/matrix/client.go @@ -22,7 +22,7 @@ type Client struct { greetedRooms []id.RoomID olmMachine *crypto.OlmMachine store *sqlStore - syncer mautrix.Syncer + syncer *mautrix.DefaultSyncer } func NewClient(config *config.MatrixConfig, db *sql.DB) (*Client, error) { @@ -63,7 +63,7 @@ func (c *Client) Login() error { deviceID := c.loadDeviceID(userID) - _, err := c.client.Login(&mautrix.ReqLogin{ + _, err = c.client.Login(&mautrix.ReqLogin{ Type: mautrix.AuthTypePassword, Identifier: mautrix.UserIdentifier{ Type: mautrix.IdentifierTypeUser, @@ -183,6 +183,8 @@ func (c *Client) Broadcast(message *event.MessageEventContent) (success bool) { success = true } } + + return success } func (c *Client) handleMemberEvent(source mautrix.EventSource, evt *event.Event) {