California has signed legislation which bans the use of undeclared bots during elections.