| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Download images received in events, adding them to Purple's image
cache.
There are probably improvements that can be made in failure paths
and also in trying to use thumbnails.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Matrix uses JSON to pass messages, and the Matrix API functions are perfectly capable of handling the required escaping. HTML needs no escaping.
Signed-off-by: Bryce Chidester <bryce@cobryce.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In 2f143058d I used the purple_util_fetch_url_request_data_len_with_account
which turns out to be new in libpurple 2.11 and ubuntu is still
stuck on 2.10.
This is a build hack that allows building on 2.10 but doesn't
allow sending images.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turn on purple's image facility and cause the messages to be sent.
There are two tricky parts to this:
a) Purple's idea is a message that can include an image anywhere
in it; while Matrix's idea is that you have text events and image
events but currently no combo events. My (hacky) solution here
is to split purple messages into the text and image components.
b) Matrix's images are files that need uploading before the event
is sent, and the upload process gives a uri back that must
be included in the event. That means we have to somehow delay
sending the event until we have the file uploaded. I solve that
by using the event hook I added in an earlier commit.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Some events need to do something else before the event can be
transmitted, and indeed the contents of the event aren't necessarily
known until that other thing has happened.
Add a hook that gets called when the event is ready to be sent
and when the event is to be free'd.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
| |
Spot the /me in what we get from pidgin and use m.emote msgtype.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
| |
Spot the event msgtype m.emote and add a /me to what we feed purple.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
| |
https://github.com/matrix-org/matrix-doc/pull/165 changes the format of the
/sync response. Update our code to accept it.
|
|
|
|
| |
If a room's name changed, we didn't update the UI.
|
|
|
|
|
| |
Double-clicking a user in the chat window would cause an infinite loop. Because
apparently I fail at linked-lists.
|
|
|
|
|
|
|
|
|
|
| |
We needed better tracking of what we had told purple was each member's
displayname. It was terribly confusing having matrix-roommembers try to track
it implicitly, which was causing bugs where we were getting out of sync.
Instead, let matrix-roommembers hold opaque data for each member, which
matrix-room then uses to keep track of the purple displayname. Then move a
bunch of the member-update-handling stuff back into matrix-room.
|
|
|
|
| |
We want to include invited members when we are considering names for rooms.
|
|
|
|
|
| |
Fixing this means purple is slightly less confused about who the users in our
chats are.
|
|
|
|
|
| |
Make the displayname on our sent messages match that in the member list for the
room.
|
|
|
|
|
| |
Propagate received invites to the UI, and correctly handle accepting/refusing
them.
|
|
|
|
|
| |
Apart from generally being cleaner, we're going to want to use the statetable
in isolation of rooms, to handle invites.
|
|
|
|
| |
If a user unticks 'persistent', then closes a tab, we should leave the room.
|
|
|
|
|
|
|
|
|
| |
Trying to keep the size of matrix-room.c under control, move the membertable
management bits out to a separate file.
Also do away with the special handling for the first /sync of a room, and
instead *always* group together member arrivals/departures until after we've
finished handling the state table.
|
|
|
|
| |
The 'persistent' behaviour matches the matrix model much better.
|
|
|
|
|
|
|
|
| |
An initial implementation for displaying the people in a room. This isn't very
nice, and the code is somewhat thrown together as a prototype/proof-of-concept
for now. We probably want to refactor matrix-room.c, which is now altogether
too unwieldy. It probably also makes sense to try to do some of this stuff on
the server.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This structure comes and goes with each connection, so rename it to better
reflect its lifecycle.
|
|
|
|
|
|
| |
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_*.
|
| |
|
|
|
|
| |
Do local echo of sent messages, and ignore the remote echo.
|
|
|
|
|
|
| |
Implement an event queue, and send messages through it.
We still need to sort out local echo.
|
|
|
|
| |
Make sure that we delete the room state structures when they are thrown away.
|
|
|
|
| |
Move things around quite a lot, to make it a bit saner
|
|
|
|
| |
We now receive new messages in existing chats.
|
|
|
|
| |
Eclipse was using tabs instead of spaces :/
|
|
|
|
|
| |
Make sure we are consistent with the identifiers used for chats, so that
double-clicking on the name of a chat in the buddy list switches to that chat.
|
|
|
|
|
| |
This code needs tidying up, and I need to figure out how to stop the messages
appearing in the logs each time we commit, but it's clearly progress.
|
|
|
|
|
| |
initialSync is going away, so switch over before we get too far into the old
way.
|
|
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?
|