aperezdc / luabot

An XMPP (Jabber) bot written in Lua using the protocol implementation from Verse/Prosody

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trac: Edit actions in Trac should set the author

aperezdc opened this issue · comments

When doing calls to the ticket.update method, the plugin should try and set the author of the updates, instead of relying on Trac to driving the authorship information from the credentials used to access the Trac instance. This way, updates posted by the bot will appear as if the author actually did them, instead of showing as authored by the user that the bot identifies itself as.

For reference, the TracRpc source code shows that there is a couple of additional parameters to ticket.update which do not appear to be documented in the TracRpc help page:

def update(self, req, id, comment, attributes={}, notify=False,
           author='', when=None):
   ...

Note that passing the author requires that the user credentials used by the bot have the TICKET_ADMIN permission. Otherwise a warning message is sent to the Trac log and the value of author is ignored.