mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2424 from omnivore-app/fix/twitter
fix: tweet not saved
This commit is contained in:
commit
6ef970a6e4
2 changed files with 12 additions and 6 deletions
|
|
@ -288,7 +288,10 @@ export class NitterHandler extends ContentHandler {
|
|||
|
||||
const tweet = parseTweet(item)
|
||||
// filter out replies
|
||||
if (tweet && tweet.author.username.toLowerCase() === username) {
|
||||
if (
|
||||
tweet &&
|
||||
tweet.author.username.toLowerCase() === username.toLowerCase()
|
||||
) {
|
||||
tweets.push(tweet)
|
||||
}
|
||||
}
|
||||
|
|
@ -347,7 +350,7 @@ export class NitterHandler extends ContentHandler {
|
|||
'_normal',
|
||||
'_400x400'
|
||||
)}`
|
||||
const description = _.escape(tweet.text)
|
||||
const description = _.escape(tweet.text) || escapedTitle
|
||||
const imageDomain =
|
||||
domain.toLowerCase() === 'twitter.com'
|
||||
? 'https://pbs.twimg.com'
|
||||
|
|
@ -378,10 +381,7 @@ export class NitterHandler extends ContentHandler {
|
|||
)
|
||||
.join('\n')
|
||||
|
||||
tweetsContent += `
|
||||
<p>${text}</p>
|
||||
${includesHtml}
|
||||
`
|
||||
tweetsContent += `<p class="_omnivore_tweet_content">${text}</p>${includesHtml}`
|
||||
}
|
||||
|
||||
const tweetUrl = `
|
||||
|
|
@ -402,6 +402,7 @@ export class NitterHandler extends ContentHandler {
|
|||
<meta property="og:site_name" content="Twitter" />
|
||||
<meta property="og:type" content="tweet" />
|
||||
<meta property="dc:creator" content="${author.name}" />
|
||||
<meta property="twitter:description" content="${description}" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="_omnivore_twitter">
|
||||
|
|
|
|||
|
|
@ -586,3 +586,8 @@ on smaller screens we display the note icon
|
|||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.article-inner-css ._omnivore_tweet_content {
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue