Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
17bac21fd2
commit
0c5658920d
3 changed files with 9 additions and 15 deletions
|
@ -70,6 +70,9 @@ namespace BirdsiteLive.Domain
|
|||
if (tweet.InReplyToStatusId != default)
|
||||
inReplyTo = $"https://{_instanceSettings.Domain}/users/{tweet.InReplyToAccount.ToLowerInvariant()}/statuses/{tweet.InReplyToStatusId}";
|
||||
|
||||
if (tweet.QuoteTweetUrl != null)
|
||||
content += $@"<span class=""quote-inline""><br><br>RT: <a href=""{tweet.QuoteTweetUrl}"">{tweet.QuoteTweetUrl}</a></span>";
|
||||
|
||||
var note = new Note
|
||||
{
|
||||
id = noteUrl,
|
||||
|
|
|
@ -316,7 +316,6 @@ namespace BirdsiteLive.Twitter
|
|||
.GetProperty("quoted_status_permalink").GetProperty("expanded").GetString();
|
||||
quoteTweetLink = quoteTweetLink.Replace("https://twitter.com/", $"https://{_instanceSettings.Domain}/users/");
|
||||
quoteTweetLink = quoteTweetLink.Replace("/status/", "/statuses/");
|
||||
MessageContent += $@"<span class=""quote-inline""><br><br>RT: <a href=""{quoteTweetLink}"">{quoteTweetLink}</a></span>";
|
||||
}
|
||||
var extractedTweet = new ExtractedTweet
|
||||
{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
using System.Net.Http;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Threading.Tasks;
|
||||
using BirdsiteLive.Common.Settings;
|
||||
using BirdsiteLive.DAL.Contracts;
|
||||
using BirdsiteLive.Statistics.Domain;
|
||||
using BirdsiteLive.Twitter;
|
||||
using BirdsiteLive.Twitter.Tools;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using BirdsiteLive.Statistics.Domain;
|
||||
using Moq;
|
||||
using BirdsiteLive.DAL.Contracts;
|
||||
using BirdsiteLive.Common.Settings;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace BirdsiteLive.ActivityPub.Tests
|
||||
{
|
||||
|
@ -85,14 +85,6 @@ namespace BirdsiteLive.ActivityPub.Tests
|
|||
Assert.IsTrue(tweet.Media[0].Url.StartsWith("https://video.twimg.com/"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task SimpleQT()
|
||||
{
|
||||
var tweet = await _tweetService.GetTweetAsync(1610807139089383427);
|
||||
|
||||
Assert.AreEqual(tweet.MessageContent, "When you gave them your keys you gave them your coins.<span class=\"quote-inline\"><br><br>RT: <a href=\"https://domain.name/users/kadhim/statuses/1610706613207285773\">https://domain.name/users/kadhim/statuses/1610706613207285773</a></span>");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task SimpleThread()
|
||||
{
|
||||
|
|
Reference in a new issue