David Woodhouse [Wed, 6 Dec 2017 16:37:41 +0000 (16:37 +0000)]
Call cleanup
Split out chime-call-transport.c so we can add DTLS more easily. Deal with
opening/closing the "Call Participants" window by adding a chat menu, which
will also be the basis for starting an audio call.
David Woodhouse [Tue, 5 Dec 2017 13:34:32 +0000 (13:34 +0000)]
Fix support for more than 100 contacts
Oh joy, there's a completely separate way to handle fetching of contacts
in stages. The 'NextToken' is in a special header instead of in the JSON
response, but ultimately it's very similar. Make fetch_contacts() work
like fetch_conversations() and fetch_rooms() do.
This fixes the disappearance of contacts, when you have more than 100.
Which was partly masked by the fact that we weren't deleting the buddies
from Pidgin.
David Woodhouse [Tue, 5 Dec 2017 13:32:10 +0000 (13:32 +0000)]
Fix buddy removal when they're no longer in the contacts list
We're supposed to remove purple buddies when they are no longer in the
contacts list, but we weren't removing them if they were visible to us
at all (by virtue of being in a conversation or a room).
David Woodhouse [Tue, 5 Dec 2017 13:30:04 +0000 (13:30 +0000)]
Explicitly close ChimeConnection in chime_purple_close()
Instead of allowing it to be implicitly closed by the final unref, close
it explicitly. This allows us to fix up the refcounting elsewhere, so
the objects associated with the connection can just hold a ref to it.
It was kind of OK for rooms/conversations but it's getting silly with
meetings adn calls.
Isaac Jurado [Thu, 16 Nov 2017 11:22:34 +0000 (12:22 +0100)]
Escape the "|" character in GWT requests.
Apart from the backslash "\", the pipe character "|" also needs to be escaped
for obvious reasons. Not escaping it breaks the format of the GWT requests.
Nicola Girardi [Wed, 25 Oct 2017 22:22:29 +0000 (23:22 +0100)]
Initial support for receiving attachments
- uses purple_util_fetch_url_len() rather than hijacking the soup session
- saves attachments in $HOME/.purple/chime-purple/$email/downloads
- displays attachment in the chat or conversation if content type is image
- notifies of downloaded file if attachment is not an image
- does *not* handle variants
David Woodhouse [Tue, 7 Nov 2017 04:55:43 +0000 (05:55 +0100)]
Remove 'wait-for-connection' property
Now we should have FsAppTransmitter "working", at least with the
audiotestsrc and filesink for now. Hooking it up to an actual
appsrc/appsink and to paulbohm's code remains to be done...
David Woodhouse [Fri, 3 Nov 2017 08:30:52 +0000 (08:30 +0000)]
Not working with filesink
The fsappbin1 bin never entes the PLAYING state, for some reason. Hopefully
I can get a coherent response to
https://lists.freedesktop.org/archives/farstream-devel/2017-November/000079.html
David Woodhouse [Wed, 18 Oct 2017 14:49:54 +0000 (15:49 +0100)]
Abort connection when server kicks us off
Oops, this snuck in with another commit. I'm willing to rewrite
history to fix that, even though I wouldn't do it to fix the stupid
"calender" typo that inexplicably slipped in last week.
David Woodhouse [Fri, 15 Sep 2017 02:01:17 +0000 (19:01 -0700)]
Flesh out the DataMessage stuff a little more.
Definitely needs a lot more testing. I did manage to see two fragments in
a real call today, rather than the single frag that I get in my test
Instant Meetings. But this is crying out for a proper set of test cases...
David Woodhouse [Thu, 14 Sep 2017 18:47:30 +0000 (11:47 -0700)]
Prefer conversations with peers that have fully-populated profiles
Where we have multiple conversations with the same peer email address
because there are multiple profiles with that email address, prefer
(for outbound messages) the profile that has a meaningful display_name
field rather than just a copy of the email address.
David Woodhouse [Thu, 14 Sep 2017 17:26:55 +0000 (10:26 -0700)]
Fix crash when multiple conversations exist with the same peer email address
There can be more than one profile for a given email address. You can have
conversations with both profiles. I don't know how this happens, but I've
seen the aftermath.
This was causing the first 'im' structure to be destroyed when the second
was discovered, which caused a use-after-free because I haven't yet
converted the chime_im/chime_room/chime_msgs stuff to proper GOBjects
and refcounted them, and the fetch_messages call was still pending.
For a quick "fix", keep them around by having a hash table on profile_id
too.
David Woodhouse [Thu, 14 Sep 2017 13:40:25 +0000 (06:40 -0700)]
Decode RT messages, extract audio
We really need to work out how to get this hooked up to Pidgin now;
we *have* the audio data and if we #define AUDIO_HACKS we can play it
back.
It still kicks us off as we're not sending any but the first message,
but once we have audio data to send that'll be fixed. Need to set up
a periodic empty message even if we're muted though.
David Woodhouse [Wed, 13 Sep 2017 21:59:30 +0000 (14:59 -0700)]
Audio calls actually connecting
Needs cleanup and object lifetime handling taken into account, but
progress nonetheless. Someone needs to work out how to use
fsrawconference (presumably) to allow us to actually pass the audio
to Pidgin to be heard, instead of just spewing it to stdout.
David Woodhouse [Mon, 11 Sep 2017 21:12:20 +0000 (14:12 -0700)]
Import tincan protobuf definitions
We will probably end up doing this differently — partly because we might
be able to use a GLib-based protobuf encoder/decoder which fits more
neatly, and partly because we don't *want* to be lifting things from
internal code even if it's just the protocol definitions in a standard
form. But this is the easy option for now....
David Woodhouse [Mon, 11 Sep 2017 20:03:10 +0000 (13:03 -0700)]
Use soup_session_websocket_connect_async() again
This mostly reverts commit b767104a2a1 ("Open-code replacement for
soup_session_websocket_connect_async()"). That was reasonable enough
when we only had one websocket. Now we're going to have more, so lift
the original one and hack it to work with our ChimeWebsocketConnection
too.
Michael Gruenewald [Mon, 11 Sep 2017 13:34:11 +0000 (15:34 +0200)]
Improve group conversation naming
Before, group conversations were named by concatenating member names
using just `,`. With our peculiar member names that resulted in
conversation names like
Last1, First1,Last2, First2
which hurts the typographical part of my brain. With semicolons and an
extra space it looks like that:
David Woodhouse [Fri, 8 Sep 2017 20:42:47 +0000 (21:42 +0100)]
Try to improve chat room handling in buddy list / room list
Attempt to keep names up to date and use RoomId instead of name to be
unambiguous where we can. Not entirely sure I like this but I didn't
much like it before, either...
David Woodhouse [Thu, 7 Sep 2017 14:29:18 +0000 (15:29 +0100)]
Update room names
We only get told of the name change on the room channel itself, which we don't
subscribe to unless we have it open — and even then it only tells us that it's
been updated; not what the change was. So we have to refetch it. But it's
better than nothing.
We should probably trigger a fetch_rooms() when the roomlist is brought up
in the UI, to make sure they're up to date.
David Woodhouse [Mon, 4 Sep 2017 20:29:08 +0000 (21:29 +0100)]
Attempt to reduce error-prone duplication in property parsing/handling
It is entirely possible that the cure here is worse than the disease,
but I wanted to at least have a go at it before I press on with adding
yet more of this crap, with the rest of the ChimeMeeting fields and also
ChimeCall etc...
David Woodhouse [Wed, 6 Sep 2017 14:00:54 +0000 (15:00 +0100)]
Fix fetching of room messages
We can't rely on having a current LastSent for Rooms, so always fetch
from our last known message, just in case.
It would be nice if Chime always sent us a 'PreviousMessageId' with
each message, which would allow us to ditch this when we're opening
the room due to a mention. And would help in a few other cases too.