runAsyncForMessage method
Runs the async action only if the message ID is different from the last processed one.
Implementation
void runAsyncForMessage(String? messageId, Future<void> Function() action) {
if (messageId == null || messageId != _lastMessageId) {
_lastMessageId = messageId;
runAsync(action);
}
}