diff options
author | Mario <mario@mariovavti.com> | 2020-02-11 09:20:32 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-02-11 09:20:32 +0000 |
commit | 9f029336cab322e04d29af842ba0a666189c8683 (patch) | |
tree | 27c267bb8297d4f79ea5b360e05a63d7d7e577c0 /Zotlabs | |
parent | 95476cf33cf7c7971e018f9136d1c64dfc901d17 (diff) | |
download | volse-hubzilla-9f029336cab322e04d29af842ba0a666189c8683.tar.gz volse-hubzilla-9f029336cab322e04d29af842ba0a666189c8683.tar.bz2 volse-hubzilla-9f029336cab322e04d29af842ba0a666189c8683.zip |
fix notifications for polls
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 5 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index f6f8ad0cb..85e90d67c 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -810,8 +810,9 @@ class Enotify { } else { $itemem_text = (($item['item_thread_top']) - ? t('created a new post') - : sprintf( t('commented on %s\'s post'), '[bdi]' . $item['owner']['xchan_name'] . '[/bdi]')); + ? (($item['obj_type'] === 'Question') ? t('created a new poll') : t('created a new post')) + : (($item['obj_type'] === 'Answer') ? sprintf( t('voted on %s\'s poll'), '[bdi]' . $item['owner']['xchan_name'] . '[/bdi]') : sprintf( t('commented on %s\'s post'), '[bdi]' . $item['owner']['xchan_name'] . '[/bdi]')) + ); if($item['verb'] === ACTIVITY_SHARE) { $itemem_text = sprintf( t('repeated %s\'s post'), '[bdi]' . $item['author']['xchan_name'] . '[/bdi]'); diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 2386a1f0d..dee7cda56 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -204,6 +204,10 @@ class ThreadItem { } } + if($item['obj_type'] === 'Question') { + $response_verbs[] = 'answer'; + } + $consensus = (intval($item['item_consensus']) ? true : false); if($consensus) { $response_verbs[] = 'agree'; |