Hi
I’m using a multi-user node.js hosted TiddlyWiki setup behind a reverse proxy. Authenticated usernames appear correctly in the $:/status/UserName tiddler (recovered from the headers populated by the reverse proxy).
I want to customise the behaviour of tiddlers which are displayed on startup based on the logged in user. For example, to display a welcome message which can be dismissed by a user and which persists for their future sessions with the wiki.
Whilst I can construct the filter logic, I’ve found that at the point where the default tiddlers filterlist or when actions in tiddlers tagged with $:/tags/StartupAction/PostRender is evaluated the $:/status/UserName hasn’t been populated. Presumably this is because the TiddlyWeb adapter hasn’t updated the status yet from the server. If I run the same filter logic manually (e.g. triggered using a button) then it all works as expected.
I could write some Javascript which accesses the TiddlyWeb adapter method for updating status but with a different callback - but strikes me as overly complex.
Does anyone know a way of triggering a startup action after the server status tiddlers have been updated?
Alternatively, does anyone know a way of nicely delaying the evaluation of the startup actions? For example, triggering a sleep for a couple of seconds before evaluating a block of markdown?
Thanks
Paul