Browse Source

fix posting by email

pull/25/head
Aaron Parecki 9 years ago
parent
commit
ea4a20015c
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      controllers/hooks.php

+ 4
- 4
controllers/hooks.php View File

@ -25,16 +25,16 @@ $app->post('/mailgun', function() use($app) {
);
if(k($params, 'Subject'))
$data['name'] = k($params, 'Subject');
$data['name'] = trim(k($params, 'Subject'));
if(k($params['body-plain'])
$data['content'] = k($params, 'body-plain');
if(k($params, 'body-plain'))
$data['content'] = trim(k($params, 'body-plain'));
// Set tags for any hashtags used in the body
if(preg_match_all('/#([^ ]+)/', $data['content'], $matches)) {
$tags = array();
foreach($matches[1] as $m)
$tags[] = $m;
$tags[] = trim($m);
if($tags) {
if($user->send_category_as_array != 1) {
$data['category'] = $tags;

Loading…
Cancel
Save