是否可以使用symphonyoss依赖关系检索与我聊天的用户列表?
请参考以下我正在使用的依赖项,
<dependency>
<groupId>org.symphonyoss.symphony</groupId>
<artifactId>symphony-client</artifactId>
<version>1.1.4</version>
</dependency>
我想在页面右侧创建一个面板,在该面板上将显示已连接用户的所有猫的列表,当他单击聊天时,将打开一个弹出窗口,其中包含讨论的历史记录
我已经找到聊天服务,但是所有我们的交响乐用户的搜索结果都为空!
@Autowired
org.symphonyoss.client.SymphonyClient symphonyClient;
// ....
SymUser remoteUser = symphonyClient.getUsersClient().getUserFromEmail("Takfa.Imehrazen@afnay.com");
Set<Chat> listChats = symphonyClient.getChatService().getChats(remoteUser);
// listChats is all times null
Set<SymUser> listuser = symphonyClient.getUsersClient().getUsersFromStream(remoteUser.getId().toString());
// listuser is null too
答案 0 :(得分:0)
这将列表以一对一的方式显示,
List<SymStreamAttributes> listuser3 = symphonyClient.getStreamsClient().getStreams((Integer) 1, (Integer) 10, new SymStreamFilter());
for (SymStreamAttributes symStream : listuser3) {
sm = new Stream();
List<Long> listmembers = (symStream.getSymChatSpecificStreamAttributes() != null) ? symStream.getSymChatSpecificStreamAttributes().getMembers() : null;
for (Long userId : listmembers) {
if (userId != localUser.getUserId()) {
SymUser contact = symphonyClient.getUsersClient().getUserFromId(userId);
sm.setDisplayName(contact.getDisplayName());
sm.setId(contact.getId());
listSendedUser.add(sm);
}
}
}
return listSendedUser;
如果您还想使用房间流
symStream.getSymRoomSpecificStreamAttributes()