diff --git a/src/common/logger.py b/src/common/logger.py
index ce07d0132f146fa34c13a522a05c9013dac3aee7..d4af560f15f5bcf098c7fd17f7f4b20827d6e777 100644
--- a/src/common/logger.py
+++ b/src/common/logger.py
@@ -561,7 +561,7 @@ class Logger:
 		return start_of_day
 
 	def get_conversation_for_date(self, jid, year, month, day, account):
-		'''returns contact_name, time, kind, show, message
+		'''returns contact_name, time, kind, show, message, subject
 		for each row in a list of tupples,
 		returns list with empty tupple if we found nothing to meet our demands'''
 		try:
@@ -576,7 +576,7 @@ class Logger:
 		last_second_of_day = start_of_day + seconds_in_a_day - 1
 
 		self.cur.execute('''
-			SELECT contact_name, time, kind, show, message FROM logs
+			SELECT contact_name, time, kind, show, message, subject FROM logs
 			WHERE (%s)
 			AND time BETWEEN %d AND %d
 			ORDER BY time
diff --git a/src/history_window.py b/src/history_window.py
index bd20605aed38feab0f224faef903f87b590b9679..f3bcfad087234d2b3b6425d5c81ebbb9a13858cd 100644
--- a/src/history_window.py
+++ b/src/history_window.py
@@ -372,9 +372,10 @@ class HistoryWindow:
 		for line in lines:
 			# line[0] is contact_name, line[1] is time of message
 			# line[2] is kind, line[3] is show, line[4] is message
-			self._add_new_line(line[0], line[1], line[2], line[3], line[4])
+			self._add_new_line(line[0], line[1], line[2], line[3], line[4],
+				line[5])
 
-	def _add_new_line(self, contact_name, tim, kind, show, message):
+	def _add_new_line(self, contact_name, tim, kind, show, message, subject):
 		'''add a new line in textbuffer'''
 		if not message and kind not in (constants.KIND_STATUS,
 			constants.KIND_GCSTATUS):
@@ -457,7 +458,9 @@ class HistoryWindow:
 				format = before_str + contact_name + after_str + ' '
 				buf.insert_with_tags_by_name(end_iter, format, tag_name)
 
-		message = message + '\n'
+		if subject:
+			message = _('Subject: %s\n') % subject + message
+		message += '\n'
 		if tag_msg:
 			self.history_textview.print_real_text(message, [tag_msg],
 				name=contact_name)