David Woodhouse [Sat, 11 Nov 2023 17:15:19 +0000 (17:15 +0000)]
Kill parse_time() and replace it with iso8601_to_ms()
GTimeVal has been deprecated; we need to use GDateTime to parse ISO8601
strings. All we really want is milliseconds so just create a helper to
do that, and convert the one user of parse_time() to it for now. Other
callers of g_time_val_from_iso8601() will use it next...
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
David Woodhouse [Sat, 11 Nov 2023 15:39:39 +0000 (15:39 +0000)]
Update login to use external web browser
The login process changed again and this time we really do need a browser.
Use purple_notify_uri() to spawn it, and now we get to specify our own
callback_uri for it to redirect to with the token. Use chime:// because
we already have the scripting set up to capture that.
This means we can fix the problem of multiple accounts with the chime:
scheme handler, by passing the devtoken of the account in question. We
can also pass the UI name so that we know which UI to re-enable it in.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
David Woodhouse [Sat, 28 Aug 2021 10:24:50 +0000 (11:24 +0100)]
Fix meeting ended signal handling
The arguments for the handler have *always* been wrong; it only ever
worked by fluke because the 'conn' must have ended up in the right
register for the third argument.
Noah Meyerhans [Mon, 15 Mar 2021 17:15:35 +0000 (10:15 -0700)]
packaging: templatize debian/control
Perform substitution of Build-Depends and Depends per Debian/Ubuntu
release. Build and binary dependencies for several releases are
provided; additional releases are simple to add.
In order to generate the .deb packaging metadata, a workflow such as
the following can be used (note that this assumes apt >= 2.0, which
introduced the 'satisfy' subcommand; on earlier releases, use a
combination of dpkg-checkbuilddeps and manual apt invocations or
pbuilder(8)):
This should generate proper Debian binary and source packages
targeting the current distribution provided the following conditions
are met:
1. The build is happening within the target distribution
2. The make, git, lsb-release, and dctrl-tools are installed
debian/control is generated with Build-Depends and binary Depends
substitute from the appropriate debian/deps/build-* and
debian/deps/bin-* files, respectively.
debian/changelog is generated based on git tag data with various
release and version fields substituded with the appropriate values for
the current distribution environment (e.g. Ubuntu focal or Debian
buster).
David Woodhouse [Wed, 20 May 2020 14:09:30 +0000 (15:09 +0100)]
Add attachment upload support for chats
Based on PR#36 by Guilherme Melo but teaching Pidgin that chats can
have files instead of manually adding a separate 'Send File' menu item:
https://bitbucket.org/pidgin/main/pull-requests/701
David Woodhouse [Sun, 5 Apr 2020 12:35:49 +0000 (13:35 +0100)]
Fix EPEL7 build.
Yeah, we still can't use C99 unless we explicity ask for it.
prpl/markdown.c: In function 'do_markdown':
prpl/markdown.c:48:2: error: 'for' loop initial declarations are only allowed in C99 mode
for (char *p = *outbound; *p; p++) {
^
David Woodhouse [Tue, 31 Mar 2020 23:00:28 +0000 (00:00 +0100)]
Fetch ancient messages in 2-week chunks
Because the server doesn't play them in chronological order and we have to
sort them, this takes a lot of memory if we do years worth of messages in
one hit. Instead, fetch a heuristically reasonable sized amount at a time.
Fix msg_newer() which was returning the wrong answer, while splitting
out msg_newer_than().
David Woodhouse [Mon, 16 Mar 2020 13:56:20 +0000 (13:56 +0000)]
Allow joinable meetings to be added
This paves the way for something that looks at the calendar and inserts
the meetings where the organiser forgot to invite meet@chime.aws, or
where distribution lists were invited instead of people, so Chime can't
pop up automatically.
Dan Lenski [Wed, 26 Feb 2020 20:15:24 +0000 (12:15 -0800)]
modify Evolution plugin to ensure that a calendar event is always associated with the email address of the source for that calendar
This addresses issue #44, wherein Evolution prevents the user from editing
the created meeting if the Chime username/address doesn't exactly match an
email address configured in Evolution.
David Woodhouse [Fri, 22 Nov 2019 21:20:48 +0000 (21:20 +0000)]
Handle unexpected closure of screen websocket
I don't think this was a cause of dropouts because the reported behaviour
was a stall (no movement in the picture). And when the websocket drops,
the shared screen drops and other participants see that it's gone.
But we should handle it appropriately anyway. By visibly dropping and
reporting an error for now. If necessary we'll make it automatically
reconnect like the audio stream does.
David Woodhouse [Fri, 22 Nov 2019 21:02:55 +0000 (21:02 +0000)]
Fix outbound screenshare dropouts
I think I've found the reason, along with the reason I could never
reproduce it on demand. The videorate element insists on producing
precisely one output frame for every third of the second... since the
epoch (when GStreamer started up). Not from the start of the call.
So if you've only been running Pidgin for a few seconds and you make
a test call, and it's the first GStreamer pipeline, it all works fine.
Hang up, wait an hour and then share another screen, and it'll send
10800 duplicate copies of the first frame before it ever sends anything
else.
David Woodhouse [Fri, 22 Nov 2019 12:24:44 +0000 (12:24 +0000)]
Fix compiler warning in chime_connection_send_message_async()
(1) Event suspicious_sizeof: Passing argument "&message" of type
"gchar const **" and argument "8L /* sizeof (gchar const **) */"
to function "g_checksum_update" is suspicious. In this case,
"sizeof (gchar const **)" is equal to "sizeof (gchar const *)",
but this is not a portable assumption.
(2) Event remediation: Did you intend to use "sizeof (gchar const *)"
instead of "sizeof (gchar const **)"?
David Woodhouse [Tue, 19 Nov 2019 15:01:35 +0000 (15:01 +0000)]
Reduce outbound screenshare bandwidth
I've been sharing my screen for an hour now, without any dropouts. Not
really sure if this is it; it's never really been reproducible on
demand when I've been trying to debug it anyway...
David Woodhouse [Tue, 19 Nov 2019 10:38:44 +0000 (10:38 +0000)]
Fix use-after-free crash in message gathering
When cleanup_msgs() is called, there may be a pending fetch. We were
seeing crashes when fetch_msgs_cb() ended up using the freed msgs
structure. Let cleanup_msgs() do the freeing instead of the caller
(since we already have this nasty hack that the msgs struct needs
to be at the start of the chat/im structure. And then defer the
final free() until fetch_msgs_cb() is called, if necessary.
David Woodhouse [Mon, 18 Nov 2019 11:43:14 +0000 (11:43 +0000)]
Sort room list and implement 'Leave Room'
We can't leave rooms from the room list display because Pidgin doesn't
let us add action buttons there, but we could do our own version as a
search results box, triggered from the account menu.
David Woodhouse [Tue, 21 May 2019 17:03:22 +0000 (10:03 -0700)]
Drop libecal-1.2 BR for specfile
It's not clear why we have to change the actual pkgconfig module name
instead of just the version. But any attempt to BR one or the other
would be fairly distro-specific anyway, based on %_fedora. So we might
as well just *not* BR it, and depend on the equally distro-specific
knowledge that it's in the evolution-data-server-devel package along
with all the other things that we *do* BR.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
David Woodhouse [Mon, 24 Sep 2018 08:51:09 +0000 (09:51 +0100)]
Fix C89 build failure on Fedora 28
BUILDSTDERR: prpl/attachments.c: In function 'get_mime_type':
BUILDSTDERR: prpl/attachments.c:523:3: error: 'for' loop initial declarations are only allowed in C99 mode
BUILDSTDERR: for (int i = 0; i < sizeof(file_types) / sizeof(struct FileType); i++) {
BUILDSTDERR: ^
BUILDSTDERR: prpl/attachments.c:523:3: note: use option -std=c99 or -std=gnu99 to compile your code
Isaac Jurado [Wed, 12 Sep 2018 20:05:01 +0000 (22:05 +0200)]
Update WarpDrive authentication.
Bring the WD authentication scrapping up to date with the current web version.
The JS file used to extract the GWT policy ID no longer exists. Also, use newer
versions of the GWT request structures.