use plugin API to set message flags