DTwitter contract update
Also update the DTwitter contract to correctly include a require statement ensuring only existing users can tweet.
This commit is contained in:
parent
b980580db7
commit
d34dae04d2
|
@ -121,6 +121,8 @@ contract DTwitter {
|
|||
* {string} content - the tweet content
|
||||
*/
|
||||
function tweet(string content) public {
|
||||
// ensure the sender has an account
|
||||
require(owners[msg.sender].length > 0);
|
||||
|
||||
// get the username hash of the sender's account
|
||||
bytes32 usernameHash = owners[msg.sender];
|
||||
|
|
Loading…
Reference in New Issue