Example #1
0
 /// <summary>
 /// 屏蔽群组
 /// </summary>
 /// <param name="userId">屏蔽人UserId</param>
 /// <param name="blockedGroupId">被屏蔽群组Id</param>
 /// <param name="blockedGroupName">被屏蔽群组名称</param>
 public bool BlockGroup(long userId, long blockedGroupId, string blockedGroupName)
 {
     return(Create(userId, BlockedObjectTypes.Instance().Group(), blockedGroupId, blockedGroupName));
 }
Example #2
0
 /// <summary>
 /// 屏蔽用户
 /// </summary>
 /// <param name="userId">屏蔽人UserId</param>
 /// <param name="blockedUserId">被屏蔽UserId</param>
 /// <param name="blockedDisplayName">被屏蔽用户DisplayName</param>
 public bool BlockUser(long userId, long blockedUserId, string blockedDisplayName)
 {
     return(Create(userId, BlockedObjectTypes.Instance().User(), blockedUserId, blockedDisplayName));
 }
Example #3
0
 /// <summary>
 /// 群组是否被屏蔽
 /// </summary>
 /// <param name="userId">UserId</param>
 /// <param name="checkingGroupId">被检查的群组Id</param>
 /// <returns>如果checkingGroupId被userId屏蔽,则返回true</returns>
 public bool IsBlockedGroup(long userId, long checkingGroupId)
 {
     return(IsBlocked(userId, BlockedObjectTypes.Instance().Group(), checkingGroupId));
 }
Example #4
0
 /// <summary>
 /// 获取用户的屏蔽群组列表
 /// </summary>
 /// <param name="userId">UserId</param>
 /// <returns></returns>
 public IEnumerable <UserBlockedObject> GetBlockedGroups(long userId)
 {
     return(GetBlockedObjects(userId, BlockedObjectTypes.Instance().Group()));
 }
Example #5
0
 /// <summary>
 /// 用户是否被屏蔽
 /// </summary>
 /// <param name="userId">UserId</param>
 /// <param name="checkingUserId">被检查的UserId</param>
 /// <returns>如果checkingUserId被userId屏蔽,则返回true</returns>
 public bool IsBlockedUser(long userId, long checkingUserId)
 {
     return(IsBlocked(userId, BlockedObjectTypes.Instance().User(), checkingUserId));
 }