Exemplo n.º 1
0
 public Task SetNoRetweetsAsync(long userId, long targetId, bool isSuppressed)
 {
     if (isSuppressed)
     {
         return(_noRetweets.AddOrUpdateAsync(userId, targetId));
     }
     else
     {
         return(_noRetweets.DeleteAsync(userId, targetId));
     }
 }
Exemplo n.º 2
0
 public Task SetMutedAsync(long userId, long targetId, bool isMuted)
 {
     if (isMuted)
     {
         return(_mutes.AddOrUpdateAsync(userId, targetId));
     }
     else
     {
         return(_mutes.DeleteAsync(userId, targetId));
     }
 }
Exemplo n.º 3
0
 public Task SetBlockingAsync(long userId, long targetId, bool blocking)
 {
     if (blocking)
     {
         return(_blockings.AddOrUpdateAsync(userId, targetId));
     }
     else
     {
         return(_blockings.DeleteAsync(userId, targetId));
     }
 }
Exemplo n.º 4
0
 public Task SetFollowerAsync(long userId, long targetId, bool followed)
 {
     if (followed)
     {
         return(_followers.AddOrUpdateAsync(userId, targetId));
     }
     else
     {
         return(_followers.DeleteAsync(userId, targetId));
     }
 }
Exemplo n.º 5
0
 public async Task SetBlockingAsync(long userId, long targetId, bool blocking)
 {
     if (blocking)
     {
         await _blockings.AddOrUpdateAsync(userId, targetId);
     }
     else
     {
         await _blockings.DeleteAsync(userId, targetId);
     }
 }
Exemplo n.º 6
0
 public async Task SetFollowerAsync(long userId, long targetId, bool followed)
 {
     if (followed)
     {
         await _followers.AddOrUpdateAsync(userId, targetId);
     }
     else
     {
         await _followers.DeleteAsync(userId, targetId);
     }
 }
Exemplo n.º 7
0
 public async Task SetMutedAsync(long userId, long targetId, bool isMuted)
 {
     if (isMuted)
     {
         await _mutes.AddOrUpdateAsync(userId, targetId);
     }
     else
     {
         await _mutes.DeleteAsync(userId, targetId);
     }
 }