def get_messages_from_include_files(app_name=None):
 messages = []
 for file in ((frappe.get_hooks(u'app_include_js', app_name=app_name) or []) + (frappe.get_hooks(u'web_include_js', app_name=app_name) or [])):
  messages.extend(get_messages_from_file(os.path.join(frappe.local.sites_path, file)))
 return messages

def get_messages_from_include_files ( app_name = None ) : messages = [ ] for file in ( ( frappe . get_hooks ( u'app_include_js' , app_name = app_name ) or [ ] ) + ( frappe . get_hooks ( u'web_include_js' , app_name = app_name ) or [ ] ) ) : messages . extend ( get_messages_from_file ( os . path . join ( frappe . local . sites_path , file ) ) ) return messages
returns messages from js files included at time of boot like desk .