File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public class Comment : VotableThing
17
17
private const string CommentUrl = "/api/comment" ;
18
18
private const string EditUserTextUrl = "/api/editusertext" ;
19
19
private const string SetAsReadUrl = "/api/read_message" ;
20
+ private const string SetAsUnReadUrl = "/api/unread_message" ;
20
21
21
22
#pragma warning disable 1591
22
23
public Comment ( IWebAgent agent , JToken json , Thing sender ) : base ( agent , json ) {
@@ -227,7 +228,20 @@ protected override async Task<JToken> SimpleActionAsync(string endpoint)
227
228
/// </summary>
228
229
public async Task SetAsReadAsync ( )
229
230
{
230
- await WebAgent . Post ( SetAsReadUrl , new
231
+ await SetReadStatusAsync ( SetAsReadUrl ) ;
232
+ }
233
+
234
+ /// <summary>
235
+ /// Mark this comment as unread.
236
+ /// </summary>
237
+ public async Task SetAsUnReadAsync ( )
238
+ {
239
+ await SetReadStatusAsync ( SetAsUnReadUrl ) ;
240
+ }
241
+
242
+ private async Task SetReadStatusAsync ( string statusUrl )
243
+ {
244
+ await WebAgent . Post ( statusUrl , new
231
245
{
232
246
id = FullName ,
233
247
api_type = "json"
You can’t perform that action at this time.
0 commit comments