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:
emizzle 2018-08-05 17:51:26 +10:00
parent b980580db7
commit d34dae04d2
1 changed files with 2 additions and 0 deletions

View File

@ -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];