diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-27 15:49:48 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-31 10:28:54 +0200 |
commit | b2a51db14e61e3f742b4a0e11bcb22e5c6e12800 (patch) | |
tree | ea824a7610c7a414aef33597f613b812d5558cc6 /doc | |
parent | 33ff7bf968b76593ee076ee54838e2bb27552803 (diff) | |
download | volse-hubzilla-b2a51db14e61e3f742b4a0e11bcb22e5c6e12800.tar.gz volse-hubzilla-b2a51db14e61e3f742b4a0e11bcb22e5c6e12800.tar.bz2 volse-hubzilla-b2a51db14e61e3f742b4a0e11bcb22e5c6e12800.zip |
add 'author_is_pmable()' function with plugin hooks to control whether or not to display a 'send mail' link in the thread author menu.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/hook/author_is_pmable.bb | 14 | ||||
-rw-r--r-- | doc/hooklist.bb | 5 |
2 files changed, 18 insertions, 1 deletions
diff --git a/doc/hook/author_is_pmable.bb b/doc/hook/author_is_pmable.bb new file mode 100644 index 000000000..708350673 --- /dev/null +++ b/doc/hook/author_is_pmable.bb @@ -0,0 +1,14 @@ +[h2]author_is_pmable[/h2] + +Called from thread action menu before returning a 'send mail' link for the post author. Not all authors will be able to receive private mail, for instance those on other networks with incompatible mail systems. + +By default author_is_pmable() returns true for 'zot' xchans, and false for all others. + +The plugin is passed an array + + [ 'xchan' => $author_xchan, 'result' => 'unset' ] + +A plugin which sets the 'result' to something besides 'unset' will over-ride the default behaviour. A value of true will enable the 'send mail' link and the private mail recipient will be set to the author's xchan_hash. A value of false will disable the 'send mail' link. + + + diff --git a/doc/hooklist.bb b/doc/hooklist.bb index 137bc1b38..6933edad2 100644 --- a/doc/hooklist.bb +++ b/doc/hooklist.bb @@ -28,7 +28,7 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/account_settings]account_settings[/zrl] Called when generating the account settings form -[zrl=[baseurl]/help/hook/settings_account]account_settings_post[/zrl] +[zrl=[baseurl]/help/hook/account_settings_post]account_settings_post[/zrl] Called when posting from the account settings form [zrl=[baseurl]/help/hook/activity_received]activity_received[/zrl] @@ -64,6 +64,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/authenticate]authenticate[/zrl] Can provide alternate authentication mechanisms +[zrl=[baseurl]/help/hook/author_is_pmable]author_is_pmable[/zrl] + Called from the thread action menu to determine if we can send private mail to the post author + [zrl=[baseurl]/help/hook/bb2diaspora]bb2diaspora[/zrl] called when converting bbcode to markdown |