post message now takes a config object instead of a function