aboutsummaryrefslogtreecommitdiffstats
path: root/matrix-api.h
Commit message (Collapse)AuthorAgeFilesLines
* e2e: Add matrix_api_upload_keysDr. David Alan Gilbert2018-02-251-0/+24
| | | | | | | Add api call for uploading device and one time keys. It expects the json blobs to be presigned. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* Improve media handlingWhite_Rabbit2018-02-221-0/+9
| | | | | | | | Handle m.video, m.file, m.audio and m.image in _handle_incoming_media. Remove _handle incoming_image. On incoming media, always print a chat message with the download link and mimetype/size. If a thumbnail_url is available and the thumbnail size is small, download and show that. Otherwise, only for m_image, ask for a server generated thumbnail.
* Responding to PR commentsEion Robb2017-05-281-3/+4
| | | | | * Comment about using state table for ephermal events * Move JSON handling into matrix-api
* Merge branch 'master' into typing-notifications3Eion Robb2017-05-281-0/+1
|\
| * Re-use the device-id provided by the serverEion Robb2017-03-121-0/+1
| | | | | | | | so we don't show up once for each login
* | Send/receive typing notificationsEion Robb2017-03-121-0/+22
|/ | | | using the "Group Typing Notifications" plugin
* Merge pull request #24 from zamaudio/enable-inviteRichard van der Hoff2017-01-051-0/+24
|\ | | | | Enable room invites when matrix handle is known
| * Enable room invites when matrix handle is knownDamien Zammit2017-01-051-0/+24
| | | | | | | | Signed-off-by: Damien Zammit <damien@zamaudio.com>
* | Add matrix_api_download_thumbDr. David Alan Gilbert2016-12-271-0/+28
|/ | | | | | | | | | Allow downloading of a thumbnail for a file. Note: Synapse really doesn't like it if you don't specify the height (I get a 500); so the caller has to give some guess of dimensions, but the server gives something reasonable. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* Add matrix_api_download_fileDr. David Alan Gilbert2016-11-131-0/+23
| | | | | | Download a file given a URI. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* Pass body/len/content_type to completion callbackDr. David Alan Gilbert2016-11-131-1/+8
| | | | | | | | 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>
* api: Upload a fileDr. David Alan Gilbert2016-09-031-0/+20
| | | | | | Upload a file to a Matrix server. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
* Implement joining roomsRichard van der Hoff2015-10-301-0/+35
| | | | Double-clicking on a room in the buddy list now joins a room if necessary.
* Leave rooms when pidgin tells us to.Richard van der Hoff2015-10-301-0/+9
| | | | If a user unticks 'persistent', then closes a tab, we should leave the room.
* Improve error-handling in API requestsRichard van der Hoff2015-10-291-4/+9
| | | | | | | | | 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.
* Set HTTP request headers correctly for requests via proxyRichard van der Hoff2015-10-291-1/+3
| | | | | When making a request via a proxy, we are supposed to put the absolute URL in the request-line.
* Request a full_state sync the first time we connect to an account.Richard van der Hoff2015-10-271-2/+4
| | | | | | 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.
* Abort active sync when the account disconnectsRichard van der Hoff2015-10-221-0/+2
| | | | | 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.
* Refactor the connection codeRichard van der Hoff2015-10-221-1/+1
| | | | | | | 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
* Rename MatrixAccount to MatrixConnectionDataRichard van der Hoff2015-10-221-24/+24
| | | | | This structure comes and goes with each connection, so rename it to better reflect its lifecycle.
* Implement a 'cancel' method for the matrix-api interfaceRichard van der Hoff2015-10-221-3/+37
| | | | | | We're going to need to do proper cancelling of API requests, which means passing around enough state to make that possible, so return the MatrixApiRequestData * from matrix_api_*.
* Stash the next_batch token in the account settingsRichard van der Hoff2015-10-221-1/+3
| | | | | Persist the next_batch, so that we don't get old scrollback each time we open the application.
* Update README and file commentsRichard van der Hoff2015-10-211-2/+13
|
* Initial implementation of sending messagesRichard van der Hoff2015-10-211-0/+68
| | | | | | Implement an event queue, and send messages through it. We still need to sort out local echo.
* Use libhttp_parser for parsing the API responseRichard van der Hoff2015-10-201-4/+0
| | | | Use an external http parser, instead of inventing that wheel ourselves.
* Refactor API callbacksRichard van der Hoff2015-10-201-14/+23
| | | | | Factor out the handling of errors from API calls, to make it easier to add new ones.
* Implement polling for incoming messagesRichard van der Hoff2015-10-191-2/+4
| | | | We now receive new messages in existing chats.
* Switch to v2 /sync APIRichard van der Hoff2015-10-161-4/+4
| | | | | initialSync is going away, so switch over before we get too far into the old way.
* Initial attempts at displaying a room in pidginRichard van der Hoff2015-10-161-4/+9
| | | | | | Not quite sure if this is the right approach yet - in particular, purple distinguishes between active 'conversations', as opposed to 'chats' in the buddy list. Which should our chats be?
* Call initialSyncRichard van der Hoff2015-10-151-0/+63
Our first API call, woohoo. At the moment we just call initialSync and don't do anything with the response. But it's satisfying progress.