|
@@ -61,9 +61,8 @@ export class MockProvider {
|
|
|
public async replyTweet() {}
|
|
|
|
|
|
|
|
|
- public writeTweet(twt: string, isPrivate: boolean, retwt, replyid) {
|
|
|
- console.log('inside writetweet', retwt, replyid);
|
|
|
- // console.log('inside writetweet obj is:',this.mockTweets[0].full_text);
|
|
|
+ public writeTweet(twt: string, isPrivate: boolean, retwt, reply) {
|
|
|
+ console.log('inside writetweet', retwt, reply);
|
|
|
let newTweet = Object.assign({}, this.mockTweets[0]);
|
|
|
newTweet.full_text = twt;
|
|
|
newTweet.id = Math.floor(100000 + Math.random() * 900000);
|
|
@@ -75,7 +74,13 @@ export class MockProvider {
|
|
|
newTweet.quoted_status_id = retwt.id;
|
|
|
newTweet.quoted_status_id_str = retwt.id_str;
|
|
|
}
|
|
|
- newTweet.replyToStatusId = replyid;
|
|
|
+ if(reply){
|
|
|
+ newTweet.in_reply_to_screen_name=reply.user.name;
|
|
|
+ newTweet.in_reply_to_status_id = reply.id;
|
|
|
+ newTweet.in_reply_to_status_id_str = reply.id_str;
|
|
|
+ newTweet.in_reply_to_user_id = reply.user.id;
|
|
|
+ newTweet.in_reply_to_user_id_str = reply.user.id_str;
|
|
|
+ }
|
|
|
if (isPrivate) {
|
|
|
newTweet.private_tweet = true;
|
|
|
}
|