* add column last_update_time
* save last_update_time in event db record
* use id + updatedAt for comparison instead of mobilizon_id, this will treat updated events like new ones
* rework event selection/comparison to include unpublished with updates to ones need to be saved
* added update for unpublished events
* tests: test_update: Add create_unpublished_events tests.
* Move `MobilizonEvent.to_model` to `storage.query`
* Move `MobilizonEvent.from_model` to `storage.query`
* Move `MobilizonEvent.compute_status` to `storage.query`
* Move `publishers.exception.EventNotFound` to `storage.query.exceptions`
* Fix PublisherCoordinatorReport generation.
Without this patch we are given *either* the failed or the successful
publication reports. We actually need both, this patch implements the
merge.
* Reformat
Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
* mobilizon_bots: query: Add create_publisher.
* Move PublicationStatus to models.publication.
* Move NotificationStatus to models.notification.
* storage: query: Add events_with_status.
* storage: query: Add get_unpublished_events.
* storage: query: Add create_unpublished events.
This function takes care of looking into the database
to store only the events whose is not
already present.
* event: event: Support multiple publications.
This patch changes the public interface of `MobilizonEvent` to
support multiple publications. This mainly entails two changes:
- When instancing a `MobilizonEvent` from an `Event` model
the `publication_status` will be computed by looking at
the statuses of all the related publications.
- Now the `publication_time` is a `dict[str, Arrow]`. This
enables tracking multiple social platforms publication time.
* Update main.
* Minor fixes
* Better definition of MobilizonEvent.publication_status.
Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
* added get events stub
* added event parsing
* removed datetime
* added config and tests
* fixed response format in test
* more tests
* added error handling for request
* improved dummy data
* added get_unpublished_events
* added test
* removed last_accessed
* mobilizon_url moved to fixture
* added config comments
* moved mobilizon group to config