aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hook
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-27 15:49:48 -0700
committerzotlabs <mike@macgirvin.com>2017-03-27 15:49:48 -0700
commit3e6088c6142d1dabbfdbb8b5df276ae942bd3554 (patch)
tree05085058a954dca5ecbc8c982c04f5e1f052a305 /doc/hook
parent8292553a2087a412e0b10f5593d461d371169adb (diff)
downloadvolse-hubzilla-3e6088c6142d1dabbfdbb8b5df276ae942bd3554.tar.gz
volse-hubzilla-3e6088c6142d1dabbfdbb8b5df276ae942bd3554.tar.bz2
volse-hubzilla-3e6088c6142d1dabbfdbb8b5df276ae942bd3554.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/hook')
-rw-r--r--doc/hook/author_is_pmable.bb14
1 files changed, 14 insertions, 0 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.
+
+
+