Make lastEvent() take a filter function
Make `lastEvent()` take a filter function so we can remove any dependence on `NeochatConfig` from `NeoChatRoom`.
This commit is contained in:
@@ -211,7 +211,7 @@ public:
|
||||
* @warning This function can return an empty pointer if the room does not have
|
||||
* any RoomMessageEvents loaded.
|
||||
*/
|
||||
[[nodiscard]] const Quotient::RoomEvent *lastEvent() const;
|
||||
[[nodiscard]] const Quotient::RoomEvent *lastEvent(std::function<bool(const Quotient::RoomEvent *)> filter = {}) const;
|
||||
|
||||
/**
|
||||
* @brief Convenient way to check if the last event looks like it has spoilers.
|
||||
|
||||
Reference in New Issue
Block a user