Esempio n. 1
0
 def addRoomAndAddressBook(room_uuid, focused_user_id, be_focused_user_id):
     roomData = {
         'room_uuid': room_uuid,
         'last_msg': '',
         'user_id': focused_user_id,
         'type': 0
     }
     Room.insertRoomData(roomData)
     addressBook = AddressBook(
         focused_user_id=focused_user_id,
         be_focused_user_id=be_focused_user_id,
         room_uuid=room_uuid,
         unread_number=0,
         is_alert=1,
         type=0,
     )
     dBSession.add(addressBook)
     addressBook = AddressBook(
         focused_user_id=be_focused_user_id,
         be_focused_user_id=focused_user_id,
         room_uuid=room_uuid,
         unread_number=0,
         is_alert=1,
         type=0,
     )
     dBSession.add(addressBook)
     return True
Esempio n. 2
0
 def addRoomAndAddressBook(room_uuid, focused_user_id, be_focused_user_id):
     roomData = {
         'room_uuid': room_uuid,
         'last_msg': '',
         'user_id': focused_user_id
     }
     room = Room.insertRoomData(roomData)
     addressBook = AddressBook(
         focused_user_id=focused_user_id,
         be_focused_user_id=be_focused_user_id,
         room_uuid=room_uuid,
         unread_number=0,
         is_alert=1,
         created_at=time.time(),
         updated_at=time.time()
     )
     dBSession.add(addressBook)
     addressBook = AddressBook(
         focused_user_id=be_focused_user_id,
         be_focused_user_id=focused_user_id,
         room_uuid=room_uuid,
         unread_number=0,
         is_alert=1,
         created_at=time.time(),
         updated_at=time.time()
     )
     dBSession.add(addressBook)
     return True