| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
connected (#111)
|
|
|
|
|
|
|
| |
If we've got a stored access token, try that (by testing with a 'whoami'
call) and if it fails fall back to passworded login.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
|
|
|
|
| |
By default purple asks for a password if there's none stored, but
when we use an access token we'll want to have no password prompt
at all. To do this we flag OPT_PROTO_PASSWORD_OPTIONAL
and then have to handle the case with no password manually.
Mostly cribbed from jabber/auth_cyrus.c
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
|
|
|
| |
_login_completed currently fills in the account data from the login
transaction and then kicks off the initial sync.
Split the code to do the initial sync out; we're going to need to use it
in a different case later on.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
| |
Store the access token we get after login.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
|
| |
If we've got a previously stored olm account state then use it,
else create us a new one.
Either way, upload the device keys to the server.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
| |
so we don't show up once for each login
|
|
|
|
|
|
|
|
| |
When a response can't be parsed as JSON pass the body and length
to the callback.
Also add the content_type.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
| |
Inverting it allows us to include a warning that it needs a bleeding-edge
synapse.
|
|
|
|
|
| |
The Pidgin UI is crappy for finding old messages, so reload them from the
server on startup.
|
|
|
|
|
| |
Propagate received invites to the UI, and correctly handle accepting/refusing
them.
|
|
|
|
| |
Double-clicking on a room in the buddy list now joins a room if necessary.
|
|
|
|
|
|
|
| |
If the connection dropped in the middle of us receiving a sync response, we
tried to set the next_batch setting on the account to an invalid string
(because we failed to initialise the pointer). Fix the segfault that caused,
and clean up some of the other error handling in the area at the same time.
|
|
|
|
|
|
|
|
|
| |
Try to deal better with errors which occur during API requests, in terms of
reporting them to the user/logs, and in terms of not writing to freed
structures.
Also do some sanity-checking of the supplied homeserver URL: make sure it is
https:// or http://, and make sure we get the right number of '/'s.
|
|
|
|
|
|
| |
This requires the new full_state support from
https://github.com/matrix-org/synapse/pull/332. It's much cleaner than trying
to request the state the first time we hear about a room.
|
|
|
|
| |
Give rooms a name according to who's in it, if there is no proper name.
|
|
|
|
|
| |
Now that we persist the next_batch identifier, we no longer get all of the
state for a room, so we need to explicitly fetch it on initial sync.
|
|
|
|
|
| |
Apart from seeming like the expected behaviour, this should stop us ending up
with segfaults when the sync completes after the connection has gone away.
|
|
Move all matrix-login and bits of matrix-sync into matrix-connection, where
it seems to make more sense.
Also move MatrixConnectionData into matrix-connection.h
|