Jshint beautify and bugfix

fixed bug where after sending an attachment, the normal posts weren’t
been sent