def _get_mongooseim_history(self, user_uuid, args):
participant_user = args.get('participant_user_uuid')
participant_server = args.get('participant_server_uuid', self._xivo_uuid)
limit = args.get('limit')
user_jid = self._build_jid(self._xivo_uuid, user_uuid)
try:
if participant_user:
participant_jid = self._build_jid(participant_server, participant_user)
result = self.mongooseim_client.get_user_history_with_participant(user_jid,
participant_jid,
limit)
else:
result = self.mongooseim_client.get_user_history(user_jid, limit)
except HTTPError as e:
raise MongooseIMException(self._xivo_uuid, e.response.status_code, e.response.reason)
except RequestException as e:
raise MongooseIMUnreachable(self._xivo_uuid, e)
return result
评论列表
文章目录