Skip to content

Commit c1d60b6

Browse files
committed
v1.0.8
New options when creating group User.Deactivate
1 parent 1fe0394 commit c1d60b6

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

DiscourseApi/DiscourseApi.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
<PackageProjectUrl>https://github.com/nikkilocke/DiscourseApi</PackageProjectUrl>
99
<RepositoryUrl>https://github.com/nikkilocke/DiscourseApi</RepositoryUrl>
1010
<RepositoryType>GitHub</RepositoryType>
11-
<PackageReleaseNotes>Separate error and log streams</PackageReleaseNotes>
11+
<PackageReleaseNotes>New options when creating group
12+
User.Deactivate</PackageReleaseNotes>
1213
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
13-
<Version>1.0.6</Version>
14+
<Version>1.0.8</Version>
1415
</PropertyGroup>
1516

1617
<ItemGroup>

DiscourseApi/Group.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public class UpdateGroupParams : ApiEntryBase {
6363
public JToken membership_request_template;
6464
public string usernames;
6565
public string owner_usernames;
66+
public int? members_visibility_level;
67+
public bool? can_see_members;
68+
public bool? publish_read_state;
6669
}
6770
public class Group : ApiEntryBase {
6871
public int id;
@@ -97,6 +100,9 @@ public class Group : ApiEntryBase {
97100
public bool is_group_owner_display;
98101
public bool mentionable;
99102
public bool messageable;
103+
public int? members_visibility_level;
104+
public bool? can_see_members;
105+
public bool? publish_read_state;
100106

101107
static public async Task<GroupList> ListAll(Api api) {
102108
JObject data = await api.GetAsync("groups");

DiscourseApi/User.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ public static async Task Activate(Api api, int userId) {
295295
await api.PutAsync(Api.Combine("admin", "users", userId, "activate"));
296296
}
297297

298+
public static async Task Deactivate(Api api, int userId) {
299+
await api.PutAsync(Api.Combine("admin", "users", userId, "deactivate"));
300+
}
301+
298302
public static async Task<UserList> ListAll(Api api, string flag, string order = "created", bool ascending = true) {
299303
JObject j = await api.GetAsync(Api.Combine("admin", "users", "list", flag), new {
300304
order,

0 commit comments

Comments
 (0)