Adjust ToDo
This commit is contained in:
parent
d9201697cf
commit
8c470f1362
@ -16,3 +16,5 @@ This should ideally be run from a cron job (specifically `run.sh`), but can be r
|
|||||||
## ToDo List
|
## ToDo List
|
||||||
|
|
||||||
* Cleanup code
|
* Cleanup code
|
||||||
|
* Maybe fix the "reply to" add-in
|
||||||
|
* Maybe generate image preview of mastodon post
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
// TODO: IMPORTANT... links aren't showing previews on Bsky
|
|
||||||
|
|
||||||
import "dotenv/config";
|
import "dotenv/config";
|
||||||
import { appendFileSync, existsSync, readFileSync, unlinkSync, writeFileSync, createWriteStream } from 'fs';
|
import { appendFileSync, existsSync, readFileSync, unlinkSync, writeFileSync, createWriteStream } from 'fs';
|
||||||
import { finished } from 'stream/promises';
|
import { finished } from 'stream/promises';
|
||||||
@ -173,7 +171,7 @@ client.get(`/accounts/${process.env.MASTODON_ID}/statuses`, {
|
|||||||
});
|
});
|
||||||
if (status.mentions > 0 && status.in_reply_to_id !== null){
|
if (status.mentions > 0 && status.in_reply_to_id !== null){
|
||||||
// Post is a reply
|
// Post is a reply
|
||||||
// TODO: This isn't working yet
|
// TODO: This isn't working yet
|
||||||
const replyTo = [...status.mentions].filter((mention) => mention.id === status.in_reply_to_account_id);
|
const replyTo = [...status.mentions].filter((mention) => mention.id === status.in_reply_to_account_id);
|
||||||
if (replyTo.length > 0){
|
if (replyTo.length > 0){
|
||||||
text = `Reply to: ${replyTo[0].url}/@${replyTo[0].acct}/${status.in_reply_to_id}\n${text}`;
|
text = `Reply to: ${replyTo[0].url}/@${replyTo[0].acct}/${status.in_reply_to_id}\n${text}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user