| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a report of gcc not liking old_user_ids being unitialised;
but as far as I can tell it doesn't matter when old_len is set to 0
because the loop won't happen.
Set it to NULL and hope it placates gcc.
Fixes: 108
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
| |
Fixes #116
|
|
|
|
| |
Nothing from gcrypt is used in matrix-room.c.
|
|
|
|
|
|
| |
Use the previously stashed crypto data to decrypt the image.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
| |
m.image messages in the e2e world have a different format and
include keys. Decode the extra structures.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
| |
Cleanup on closing the plugin or leaving a conversation.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
| |
Parse the decrypted JSON and route it back up to the room code.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
| |
Decrypt m.room.encrypted messages sent to a room;
these come out with normal events.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|\
| |
| | |
Handle media messages (m.video, m.audio, m.file)
|
| |
| |
| |
| |
| |
| |
| |
| | |
With r0.3.0 thumbnail_info and thumbnail_url for m.image and m.file have
been moved from content to content.info. With this commit those objects
are looked for at the new location and if they're not found, the old
location is checked. Furthermore, if the thumbnail provided is too big,
we ask the server to make a thumbnail of it.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
| |
I've seen a crash where the user_id doesn't appear to be a member
of the room; I'm guessing they just left or only just arrived and
we got the typing notification after/before.
Fixes: 61ee52f3230724b5c1e8f81caeb16ce7887d183c
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
| |
* Comment about using state table for ephermal events
* Move JSON handling into matrix-api
|
|\ |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
using the "Group Typing Notifications" plugin
|
|\
| |
| | |
Escape incoming message bodies
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Purple intereprets incoming message bodies as pseudo HTML,
and thus eats <text> - I've not seen it do anything really
bad on Pidgin (I can trigger bold but not anything more insecure);
not sure other purple frontends.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we decide from the image info that an image is too large,
try a thumb instead.
Pick 640x480 because
a) we need to pick a size and
b) That's the right size.
c) We should make it configurable.
(We could also try this if we didn't have the image info when
we get the error).
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
|
|
|
|
|
|
|
|
| |
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_*.
|