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.
Doyle, Jordan [Sat, 19 Aug 2017 19:30:20 +0000 (19:30 +0000)]
Fix stack overflow when padding option array in fetch_room_memberships.
While-loop condition was "<= 4" meaning we actually ended up trying to
pad the array with 5 array values rather than 4 which lead to a stack
overflow and client crash. Initializing the array with NULL makes the
code agnostic to how many values it needs to pad preventing this from
happening again in the future.
David Woodhouse [Thu, 17 Aug 2017 19:46:33 +0000 (20:46 +0100)]
Emit message signal for sent messages
I caught it earlier when the juggernaut disconnected just as I was sending
a message. Perhaps unsurprisingly, when you reconnect they don't bother
to replay your *own* messages to you, so my own message didn't appear in
the chat.
It occurs to me as I type this commit message that we might not see messages
which were sent by our *other* clients, during a period of disconnection.
Will need to check that. We should definitely be monitoring for LastSent
and triggering a message refetch if we notice that we're out of date.
David Woodhouse [Sat, 12 Aug 2017 23:47:42 +0000 (00:47 +0100)]
Start obsoleting messages.c
Make conversations.c use chime_connection_fetch_messages_async().
Reproduce some of the message-gathering and replay-in-order bits from
messages.c, which can be de-duplicated again once Room chats have caught
up. And implement a 'last ten seen messages' queue for simple message
reply avoidance. Change to only show outbound messages when they come
back to us, not before they're sent.
David Woodhouse [Fri, 11 Aug 2017 01:15:11 +0000 (02:15 +0100)]
More chime_read_last_msg() cleanup
We were calling it twice in a row from on_chime_new_conversation() now, which
is silly. And pass the ChimeRoom/ChimeConversation into it, instead of a boolean
to indicate the type and the ID as a string. Which will make it closer to
chime_update_last_msg() when we eventually get round to making it a signal
on the same objects. Which won't be tonight...
David Woodhouse [Tue, 8 Aug 2017 01:26:17 +0000 (02:26 +0100)]
Start to make sense of conversations.c vs. chime-conversation.c
Use ChimeConversation objects, handle actual messages using a hacked
variant of the original code. Next up, a sane ChimeMessages object
for collecting messages for ChimeRooms and ChimeConversations, and
fixing up some of the remaining incest between Purple bits and Chime
bits. This is kind of ugly but it basically works and can be cleaned
up piecemeal from here... and it's been sitting around half-complete
for a week or so, so it's about time it got pushed.