use of com.fanap.podchat.chat.user.user_roles.model.CacheUserRoles in project pod-chat-android-sdk by FanapSoft.
the class MessageDatabaseHelper method saveCurrentUserRoles.
public void saveCurrentUserRoles(ChatResponse<ResultCurrentUserRoles> response) {
worker(() -> {
long threadId = response.getSubjectId();
List<String> roles = response.getResult().getRoles();
CacheUserRoles cacheUserRoles = new CacheUserRoles();
cacheUserRoles.setThreadId(threadId);
cacheUserRoles.setRole(roles);
messageDao.insertCurrentUserRoles(cacheUserRoles);
});
}
use of com.fanap.podchat.chat.user.user_roles.model.CacheUserRoles in project pod-chat-android-sdk by FanapSoft.
the class MessageDatabaseHelper method getCurrentUserRoles.
public void getCurrentUserRoles(RequestGetUserRoles request, OnWorkDone listener) {
worker(() -> {
CacheUserRoles role = messageDao.getUserRoles(request.getThreadId());
listener.onWorkDone(role);
});
}
Aggregations