Delete Messages Older Than X Days in a Mattermost Channel
delete_old_messages.Rd
This function deletes messages that are older than a specified number of days in a given Mattermost channel. It fetches the messages from the channel, checks their timestamps, and deletes the ones that are older than the specified days.
Usage
delete_old_messages(channel_id, days, auth = authenticate_mattermost())
Examples
if (FALSE) { # \dontrun{
teams <- get_all_teams()
team_channels <- get_team_channels(team_id = teams$id[1])
channel_id <- get_channel_id_lookup(team_channels, name = "off-topic")
posts <- delete_old_messages(channel_id, 0)
} # }