New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweet Entity #3748
Tweet Entity #3748
Conversation
…ions and handle new action in a modal
…eadBundle\Entity\Lead as Lead because the name is already in use
…only if Twitter integration is enabled
…ets, just squeezing it in this lazyness reasons
…to tweets, just API improvement
I get the following error when running the migration:
Should the fields |
I changed them to |
Thanks for catching that, Don! I tested the migration several times. Weird it did not cause any trouble for me. I made the count columns nullable. To retest, please delete the |
That worked @escopecz. Thanks! |
Unit tests pass and everything is looking good. 👍 |
Tested this PR and it works great! Thanks John! |
Description:
Right now the Tweet Marketing Message (MM) Channel is stored as MM parameters, it's not a link to a independent entity like other channels are. This limits us on showing some stats for specific tweets, reusing tweets and so on. This PR creates a Tweet entity and the standard Mautic infrastructure around it like permissions who can create/edit/view (own) tweets, UI to view, create and edit tweets and so on.
Attached database migration will create the tweet table and migrates existing Tweets from MM and channel events to it and links those newly created tweets back to MM and channel events to where they belong.
Topic to discuss:
I'd like to start also a discussion about what fields the tweet entity should have. I added some fields like
tweet_id
,media_id
,date_tweeted
... which are not used now, but I think they will find its use in the future. This way we'll avoid another migrations. The inspiration about available tweet fields can be find in the twitter API docs: https://dev.twitter.com/overview/api/tweetsFor example
coordinates
orplace
orin_reply_to_user_id
. Should they be included?Right now, after the tweet is sent, the tweet_id from Twitter and date_tweeted is being updated for the tweet entity. Although it will keep value only for the last sent tweet. The tweets serves now as a template where the same tweet can be sent to many contacts, so that's not probably the right place where to store those details.
Steps to test this PR:
php app/console cache:clear
).php app/console doctrine:migrations:migrate
)Migrated from marketing message (1) channel (91)
. Also the fields like date_added, created_by and so on will be filled with the values from MM/campaign where the tweet was created.