-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(thread): implement sendReadReceipt
api method
#17
feat(thread): implement sendReadReceipt
api method
#17
Conversation
src/network-api/index.ts
Outdated
}), | ||
}) | ||
|
||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we clone object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All responses from tumblr api is wrapped in a response
object. Something like this
{
"meta": {
"status": 200,
"msg": "OK"
},
"response": {
"user": {
"name": "nurguly",
"likes": 32,
"following": 79,
...
}
}
}
So for each api request I "unwrap" it. Makes it much easier to deal with static typing and dealing with responses in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be slightly more memory-efficient to just return response.json.response
rather than spreading it, since this creates and returns a shallow copy of the object. Think that's what Kishan was getting at. You'd still be "unwrapping" it, but without the need for the extra mem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh! I misunderstood. Updated now! 01d5aa1
01d5aa1
to
ddb7dae
Compare
Install this branch's platform manifest to test its implementation. Manifest Installation (Texts Desktop)
|
ddb7dae
to
01d5aa1
Compare
Description
Implements the
sendReadReceipt
api method. Along with a "Stealth Mode" support for the Tumblr.Testing Instructions
platfomr-tumblr
and build ityarn tsc
tumblrbot
and message it. Likeshow me cat gif
. Wait until it responds.tumblrbot
. (Do not open tumblrbot conversation panel in tumblr.com or else it will mark the conversation as read.)tumblrbot
thread.tumblrbot
becomes read within 10 seconds.