summaryrefslogtreecommitdiff
path: root/postgresqleu/util
AgeCommit message (Collapse)Author
8 daysAdd support for auto-booking transferwise cashbackMagnus Hagander
Transferwise re-invented interest and call it cashback (it's the same as interest..), and we already knew how to classify these transactions. So instead of leaving them as pending, automatically book them against a predefined account.
2025-06-11Update transferwise integration for new APIsMagnus Hagander
Unfortunately, Wise decided one is no longer allowed to access information about ones own transactions when in Europe, unless registered as a European payment provider. This is of course stupid, but what can we do. Attempt to re-implement the transferwise support over their new activities API. Unfortunately there are likely bugs still hiding around, since for example amounts are now returned in some self-invented html-like markup like '<positive> 2,000 EUR</positive>' instead of as a number like before (and sometimes they are returned as <positive> with a negative number inside). But we have to start somewhere... Unfortunately, it seems there's a permanent loss of funcionality in that the account number (IBAN) of the sender is no longer available anywhere in the API. This means that in practice, automatic refunds of transfers are no longer possible. (This information appears to also no longer be available on their website). We keep the refund functionality itself in the system for now, as we might want to extend it later with the ability to refund while manually specifying an IBAN number.
2025-06-02Don't crash on misspelled http/https in sponsor signupMagnus Hagander
Instead, give a proper error message.
2025-05-19Update LinkedIN API versionMagnus Hagander
Linkedin killed off 202405 as an API version. Try a blind update to 202505 and hope they didn't change any of the (very few) API calls we use :)
2025-02-28Attempt to fix the bluesky profile linkMagnus Hagander
This was clearly not quite completed whent he Bluesky support was added. Reported by Andreas Scherbaum
2025-02-20Add proper facets for hashtags when posting to blueskyMagnus Hagander
2025-02-20Decode URL as UTF-8Magnus Hagander
Apparently this is done automtatically in some versions of requests, and not others.
2025-02-20Implement "facet shortering" for bluesky postingMagnus Hagander
Turns out bluesky doesn't actually shorten URLs if they are posted through the API even if they have a matching "facet", and the example code they have ignores this. So we have to implement our own that basically shortens the "inside" of a facet to an appropriate length. We'll re-use the twitter-url-shortener-length to make things predictable between providers.
2025-02-20Give more detailed error message when failing to post to blueskyMagnus Hagander
2025-01-16Looks like the include_client_id parameter became mandatoryMagnus Hagander
2025-01-16Change linkedin provider to use a shared oauth_return URLMagnus Hagander
Since Linkedin doesn't support wildcards, having the providerid in the URL required whitelisting individual URLs which was very annoying. Instead overload it into the state field and use a shared URL. In passing, fix the redirect after attaching linkedin to a shared news provider. The attachment worked fine but the redirect went to the wrong page.
2025-01-15Avoid duplicated error message in bluesky validationMagnus Hagander
2025-01-13Don't crash trying to render non-existant VAT percentagesMagnus Hagander
The fractional VAT patch did not properly handle the case when the field could actually be NULL.
2025-01-07Fix missing quotes in version checkMagnus Hagander
2025-01-07Move fitz version checks to versionutil.pyMagnus Hagander
Move the backwards-compatibility checks for fitz over to this new file as well, instead of having them spread out through the code.
2025-01-07Support both old and new versions of pyjwtMagnus Hagander
Pyjwt 2.0 made some incompatible changes in how a signature is verified, so we need to support both the old and the new one. For cleanliness, create a util/versionutil.py that wraps these version specific things. There are clearly more.
2025-01-04Blind attempt at gocardless account reconnectMagnus Hagander
This allows the reconnection on an exisitng account. Unable to test this full workflow until an account actually has expired, but hopefully it's good...
2024-12-22Add randomness to the reference when setting up gocardlessMagnus Hagander
We must pass a unique reference to gocardless and if our existing one expired we cannot re-use the one. So add a random uuid to the reference string and hope that solves it.
2024-12-22Fix check of incorrect api callMagnus Hagander
We made two api calls but checked the status of the first one twice.
2024-12-04Support fractional VAT ratesMagnus Hagander
Allow fractional tax rates, up to 6 decimal places. Author: Steve Singer, with some fixes from me Fixes #164
2024-12-03Fix column filters for "copy from previous conference"Magnus Hagander
The contents of the dropdown in the filter was taken from the conference they are being copied *to*, but the contents of the list is the objects from the conference being copied *from*. This mostly shows up when copying sessions, when filtering by track or room makes most sense -- and would be wrong if the track/rooms didn't exist in the new conference.
2024-12-03For backend date/time fields, always show which timezone is usedMagnus Hagander
2024-12-03Remove some leftover debug print in bluesky integrationMagnus Hagander
2024-12-01Fix missing return value in Bluesky token validationMagnus Hagander
2024-11-27Fix verification of new bluesky form submissionMagnus Hagander
When creating a new message provider we can't compare the username/password to an existing one because it doesn't exist yet..
2024-11-27Add support for posting to BlueskyMagnus Hagander
This adds Bluesky as a messaging provider to the system. For the time being it only supports making broadcast posts (similar to the linkedin provider). This support should be considered alpha or beta at this time.
2024-11-13Don't crash on no-data passed to svg chartsMagnus Hagander
This could cause a divide-by-zero in some cases. Instead render the text "NO DATA". Normally, the entire svg would be exluded in this case, but in case it's not this will at least work.
2024-11-12Add support for qrcode library, and make it defaultMagnus Hagander
The qrencode library we've been using is basically dead (and has been for a while), so add support for the newer pure-python qrcode library. We keep support for the qrencode one around, so we don't break things on existing installs, but consider it deprecated and should eventually be removed. Fixes #123
2024-11-05Don't crash when both removing and uploading PDF at the same timeMagnus Hagander
Noted by Karen Jex
2024-09-11For failed social media posts, show time for next attemptMagnus Hagander
2024-09-04Add another missing importMagnus Hagander
2024-09-04Fix two misspellings of statusMagnus Hagander
2024-09-04Add missing importMagnus Hagander
2024-09-03Fix dumb typo in attribute nameMagnus Hagander
This caused an error in the view when setting up a new oauth client (such as a linkedin page). It happened *after* the actual configuration was completed, so one just had to reload for things to work, but it still shouldn't error like that.
2024-08-21Add a widget to show a simple treeviewMagnus Hagander
2024-08-21Add a form control for previewing HTMLMagnus Hagander
This uses (partially) the pgweb code for loading previewable HTML into an iframe sandbox.
2024-08-06Remove unusd importMagnus Hagander
2024-07-23Fix query for nagios alerts on unsent social media broadcastsMagnus Hagander
As of 45b8e2e9, we update the sent column to be True while leaving unsent providers in the linked table (so we can keep track of which succeeded and which failed). The nagios check never got the memo about that one, so it didn't check the sent column, only the linked table, when in fact it's now enough to *just* check the sent column. So do that.
2024-07-22Fix typo that caused message token refresh to never run in backgroundMagnus Hagander
2024-06-25Move color_validator to shared fileMagnus Hagander
2024-06-24Add exact error times to Mastodon poll timesMagnus Hagander
Anything to find a pattern.
2024-06-24Disable persistent connections for Mastodon providerMagnus Hagander
Perhaps it's the use of multiple parallel persistent connections that breaks mastodon.social? Who knows, but it's worth a try since we don't really make any useful use of the persistent connections anyway.
2024-06-24Add payment provider for Gocardless bank account dataMagnus Hagander
They provide a service similar to Plaid but better layed out for small organisations (in Europe at least) for now. Let's see how long that lasts, but for now here's a basic provider that works very similar to the Plaid one, except it does not support webhooks.
2024-06-21Fix typoMagnus Hagander
2024-06-19Trap exceptions when posting to social mediaMagnus Hagander
The providers themselves would catch some exceptions and turn them into proper error messages, but for the cases where they don't, we want the loop in the sender to do so for us and just log the exception message.
2024-06-16Add basic rate limiter for Mastodon API callsMagnus Hagander
It seems at leaast mastodon.social may have implemented rate limiting at the TCP level (afaict). To work aroud this, implement a 15 second rate limit for Mastodon API calls to individual providers (allow other calls to go quicker). As this is done per-process it only affects batch jobs, but those are also the only ones with the issue. Uncertain if this will actually work since the limit isn't documented (unlike the http level limit), but it's worth a try.
2024-05-28Trap and handle really invalid URLs from sponsor signupMagnus Hagander
If a URL is *really* invalid, we could crash with an exception instead of showing a form error.
2024-05-22Fix copy/paste errorMagnus Hagander
2024-05-22Fix typoMagnus Hagander
2024-05-18Implement messaging config validation for MastodonMagnus Hagander
This was clearly missed when Mastordon support was added, and is pretty trivial to do - we just need to try to fetch our own account info (like we already do on twitter)