- Companion:
- object
class Object
trait Matchable
class Any
Value members
Concrete methods
def addNewUsersToChat(users: List[UUID], chatId: String, chatName: ChatName)(implicit connection: Connection, ec: ExecutionContext): DbResponse[Int]
def checkUsersSession(sessionId: UUID, userId: UUID, validityTime: Long)(implicit connection: Connection): DbResponse[Int]
def createGroupChat(users: List[User], chatName: ChatName, chatId: ChatId)(implicit connection: Connection, ex: ExecutionContext): DbResponse[Chat]
def createSession(sessionId: UUID, userId: UUID, validityTime: Long)(implicit connection: Connection): DbResponse[Int]
def createSingleChat(me: User, otherId: UUID, chatId: ChatId, chatName: ChatName)(implicit connection: Connection, ec: ExecutionContext): DbResponse[Int]
def createUser(user: User, pass: Password, settings: Settings)(implicit connection: Connection): DbResponse[Int]
def findMyChats(userUUID: UUID)(implicit connection: Connection): DbResponse[Map[Chat, Map[Partition, Offset]]]
def findUsersSession(userUUID: UUID)(implicit connection: Connection): DbResponse[List[SessionInfo]]
def leaveTheChat(userId: UUID, chatId: ChatId, groupChat: Boolean)(implicit connection: Connection): DbResponse[Int]
Method return number of other chat users
Method return number of other chat users
def removeSession(sessionId: UUID, userId: UUID, validityTime: Long)(implicit connection: Connection): DbResponse[Int]
jeśli zwróci zero to znaczy, że nie usunęło sesji bo jej nie ma, albo bo usera już nie ma wtedy przekieruj na stronę logowania.
jeśli zwróci zero to znaczy, że nie usunęło sesji bo jej nie ma, albo bo usera już nie ma wtedy przekieruj na stronę logowania.
Metody można używać też do wylogowania z konkretnej sesji.
def updateChatName(myUUID: UUID, chatId: String, newName: ChatName)(implicit connection: Connection): DbResponse[Int]
def updateChatOffsetAndMessageTime(userId: UUID, chat: Chat, sortedOffsets: => Seq[(Int, Long)])(implicit connection: Connection): DbResponse[Int]
def updateChatSilence(chatId: ChatId, userId: UUID, silent: Boolean)(implicit connection: Connection): DbResponse[Int]
def updateJoiningOffset(user: User, offset: Offset)(implicit connection: Connection): DbResponse[Int]
def updateSession(sessionId: UUID, userId: UUID, newValidityTime: Long)(implicit connection: Connection): DbResponse[Int]
jeśli zwraca zero to znaczy, że nie ma updatowanej sesji i takie rządanie należy przekierować na stronę logowania
jeśli zwraca zero to znaczy, że nie ma updatowanej sesji i takie rządanie należy przekierować na stronę logowania
def updateUsersPassword(user: User, oldPass: Password, newPass: Password)(implicit connection: Connection): DbResponse[Int]