mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
mvc: mentions
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
@ -42,6 +43,24 @@ namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
public static List<Dictionary<string, object>> getUsersForMentions(string id)
|
||||
{
|
||||
List<Dictionary<string, object>> usersData = new List<Dictionary<string, object>>();
|
||||
|
||||
foreach (User user in users)
|
||||
{
|
||||
if (!user.id.Equals(id) && user.name != null && user.email != null)
|
||||
{
|
||||
usersData.Add(new Dictionary<string, object>()
|
||||
{
|
||||
{"name", user.name },
|
||||
{"email", user.email },
|
||||
});
|
||||
}
|
||||
}
|
||||
return usersData;
|
||||
}
|
||||
}
|
||||
|
||||
public class User
|
||||
|
||||
Reference in New Issue
Block a user