forked from sup-heliotrope/sup
-
Notifications
You must be signed in to change notification settings - Fork 0
Customizing Attributions
rthrd edited this page Nov 14, 2014
·
1 revision
When forwarding or replying to a message sup mentions the origin of the message by adding attributions to it.
The default attribution for forwarding is:
"--- Begin forwarded message from John Doe ---"
headers and body of the message
"--- End forwarded message ---"
The forward attribution can be customized in the forward-attribution
hook:
forward-attribution
-------------------
File: .sup/hooks/forward-attribution.rb
Generates the attribution for the forwarded message
(["--- Begin forwarded message from John Doe ---",
"--- End forwarded message ---"])
Variables:
message: a message object representing the message being replied to
(useful values include message.from.mediumname and message.date)
Return value:
A list containing two strings: the text of the begin line and the text of the
end line
An example for a forward-attribution hook featuring a German custumization:
["--- Weitergeleitete Nachricht von #{message.from.name} ---",
"--- Ende der weitergeleiteten Nachricht ---"]
The default attribution for replies is:
"Excerpts from Joe Blogg's message of 1 Jan 1999:"
The attribution for replies can be customized in the attribution
hook:
attribution
-----------
File: .sup/hooks/attribution.rb
Generates an attribution ("Excerpts from Joe Bloggs's message of Fri Jan 11
09:54:32 -0500 2008:").
Variables:
message: a message object representing the message being replied to
(useful values include message.from.name and message.date)
Return value:
A string containing the text of the quote line (can be multi-line)
An example for an attribution hook featuring a Norwegian custumization:
"#{message.date.strftime('%d. %b. %Y %H:%M')} skrev #{message.from.name} følgende:"