|
@@ -1602,11 +1602,15 @@ const TwitterApiCreateTweet = ({ text, tweet_Id }) => {
|
|
|
}
|
|
|
|
|
|
const sendChromeMessage = (done, tweet_Id, response) => {
|
|
|
- console.log('sendChromeMessage', done)
|
|
|
- if (done == '是') {
|
|
|
- chrome.runtime.sendMessage({ actionType: "DO_TASK", do_type: 'api', tweet_Id, task_type: 'createTweet1', task_data: '', task_done: '是', response })
|
|
|
- } else {
|
|
|
- chrome.runtime.sendMessage({ actionType: "DO_TASK", do_type: 'api', tweet_Id, task_type: 'createTweet1', task_data: '', task_done: '否' })
|
|
|
+ try {
|
|
|
+ console.log('sendChromeMessage', done)
|
|
|
+ if (done == '是') {
|
|
|
+ chrome.runtime.sendMessage({ actionType: "DO_TASK", do_type: 'api', tweet_Id, task_type: 'createTweet1', task_data: '', task_done: '是', response })
|
|
|
+ } else {
|
|
|
+ chrome.runtime.sendMessage({ actionType: "DO_TASK", do_type: 'api', tweet_Id, task_type: 'createTweet1', task_data: '', task_done: '否' })
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('catch', error)
|
|
|
}
|
|
|
}
|
|
|
|