Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Dependency cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion src/Moderation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public async Task<ResponseBase> FlagReactionAsync(string entityId, string entity
public async Task<ResponseBase> FlagAsync(string entityType, string entityId, string entityCreatorID,
string reason, IDictionary<string, object> options = null)
{
var request = _client.BuildAppRequest("/moderation/flag", HttpMethod.Post);
var request = _client.BuildAppRequest("moderation/flag", HttpMethod.Post);
request.SetJsonBody(StreamJsonConverter.SerializeObject(new
{
user_id = entityCreatorID, entity_type = entityType, entity_id = entityId, reason,
Expand Down
8 changes: 1 addition & 7 deletions tests/ModerationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace StreamNetTests
public class ModerationTests : TestBase
{
[Test]
[Ignore("The api is not deployed yet")]
public async Task TestModerationTemplate()
{
var newActivity2 = new Activity("1", "test", "2")
Expand All @@ -22,7 +21,7 @@ public async Task TestModerationTemplate()
};
newActivity2.SetData("moderation_template", "moderation_template_test_images");

newActivity2.SetData("a", "pissoar");
newActivity2.SetData("text", "pissoar");

var attachments = new Dictionary<string, object>();
string[] images = new string[] { "image1", "image2" };
Expand All @@ -39,7 +38,6 @@ public async Task TestModerationTemplate()
}

[Test]
[Ignore("The api is not deployed yet")]
public async Task TestReactionModeration()
{
var a = new Activity("user:1", "like", "cake")
Expand All @@ -66,11 +64,9 @@ public async Task TestReactionModeration()
Assert.AreEqual("complete", response.Status);
Assert.AreEqual("remove", response.RecommendedAction);

Assert.ThrowsAsync<StreamException>(async () => await Client.Reactions.GetAsync(r.Id));
}

[Test]
[Ignore("The api is not deployed yet")]
public async Task TestFlagUser()
{
var userId = Guid.NewGuid().ToString();
Expand All @@ -91,7 +87,6 @@ public async Task TestFlagUser()
}

[Test]
[Ignore("The api is not deployed yet")]
public async Task TestFlagActivity()
{
var newActivity = new Activity("vishal", "test", "1");
Expand All @@ -108,7 +103,6 @@ public async Task TestFlagActivity()
}

[Test]
[Ignore("The api is not deployed yet")]
public async Task TestFlagReaction()
{
var a = new Activity("user:1", "like", "cake")
Expand Down
Loading