From fba2d3b4f927c7ad8e03e15f814c837b515a87b3 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 15 May 2023 15:05:34 +0200 Subject: [PATCH] WIP: Send a tweet --- bin/main.ml | 6 +++++- bin/twitter.ml | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/main.ml b/bin/main.ml index 39d87ec..10a9549 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -38,7 +38,11 @@ let rec check ctx = in if 0 = timeout then ( - print_endline "TODO: We are tweeting here. :)"; + (* Tweet and returns to profile page *) + tweet + ctx + "This tweet is for the Twitter's CTO: Don't suspend my account for inactivity."; + go_to_profile ctx; (* Wait the maximum time since we just tweeted *) recheck max_time) else (* Wait the amount of time calculated from the post *) diff --git a/bin/twitter.ml b/bin/twitter.ml index f7ad4be..73c433d 100644 --- a/bin/twitter.ml +++ b/bin/twitter.ml @@ -133,3 +133,5 @@ let find_latest_tweet ctx = (* Returns the most recent date *) Some (List.fold_left max min_int datetimes) ;; + +let tweet _ctx _msg = ()