         }
     }
     
+    var afterExecuted: [ActionButton] {
+        switch self {
+        case .privateWarning: return [.removeAll]
+        case .publicWarning: return [.removeAll]
+        case .removeAll: return [.privateWarning, .publicWarning]
+        }
+    }
+    
     static var all: [ActionButton] { return [.privateWarning, .publicWarning, .removeAll] }
 }
 fileprivate extension Sequence where Iterator.Element == MessageDecorator {

            case .privateWarning: try self.privateWarning(messages: messages, webApi: webApi)
            case .removeAll: try self.removeAll(messages: messages, webApi: webApi)
            }
        }
    }
    

        }
    }
}

fileprivate extension CrossPostService {
    func updateWarning(message: Message, after action: ActionButton, from interactiveButton: InteractiveButtonResponse, webApi: WebAPI) throws {
        
        let update = SlackMessage(message: message)
            .updateAttachment(buttonResponse: interactiveButton) { builder in
                builder.updateOrAddField(titled: "Actions Taken") { field in
                    var values = field.value.components(separatedBy: "\n")
                    values.append("<@\(interactiveButton.user.id)> chose: \(action.text)")
                    field.value = values.joined(separator: "\n")
                }
                builder.removeButtons(matching: { !action.afterExecuted.map({ $0.rawValue }).contains($0.name) })
            }
        
        try webApi.execute(try update.makeChatUpdate(to: message, in: interactiveButton.channel))
    }
}

