#699·apprise

Support editing previously sent messages and/or threads

Author: spyoungtechCreated Oct 14, 2022Updated Oct 17, 2022
Labelsenhancement

:bulb: The Idea

Bots sometimes can be chatty if they are responsible for sending notifications for many events. Instead of sending users many notifications, it is often preferable to edit a previously sent notification (where the notification service permits this) or otherwise tidy up the multiple notifications in a digestible way.

For example, say you have a bot that monitors the build status of Pull Requests and sends notifications to Slack. There can be a lot of rapid updates (think: an update might be useful for each time every job queued/started/succeeded/failed). Instead of sending a new message with the (sometimes very long) summary to the slack channel every time the PR is rebuilt, the bot can edit its original notification for that PR -- this is what the official GitHub+Slack integration does.

To facilitate this in bots implemented with Apprise, it would be nice if there were a way to have the functionality to edit existing messages. Another way to reduce chattiness (or, really, present more tidy notifications to users) would be for Apprise to have the ability to create then respond within threads (for services that support this).

Some existing art/features as food for thought:

I don't think this would be a breaking change, since it would be new functionality, but the devil is probably in the implementation details... some care might have to be taken when using multiple services that may not all support such features required to implement. It may be possible to avoid, but I think to do this, you have to add some kind of state management responsibility to apprise (remembering message/thread ids from API responses) , which may be undesirable to undertake.