def view(request, message_id):
	Modified version of condottieri-messages view.
	Shows a single message.``message_id`` argument is required.
	The user is only allowed to see the message, if he is either 
	the sender or the recipient. If the user is not allowed a 404
	is raised. 
	If the user is the recipient and the message is unread 
	``read_at`` is set to the current datetime.
	user = request.user
	now =
	message = get_object_or_404(Letter, id=message_id)
	if (message.sender != user) and (message.recipient != user):
		raise Http404
	game =
	player = Player.objects.get(user=request.user, game=game)
	context = base_context(request, game, player)
	if message.read_at is None and message.recipient == user:
		message.read_at = now
	context.update({'message' : message,})
	return render_to_response('condottieri_messages/view.html', 
def compose(request, sender_id=None, recipient_id=None, letter_id=None):
	if sender_id and recipient_id:
		## check that the sender is legitimate
		sender_player = get_object_or_404(Player, user=request.user, id=sender_id)
		game =
		recipient_player = get_object_or_404(Player, id=recipient_id, game=game)
		parent = Letter.objects.none()
	elif letter_id:
		parent = get_object_or_404(Letter, id=letter_id)
		if parent.sender != request.user and parent.recipient != request.user:
			raise Http404
		sender_player = parent.recipient_player
		recipient_player = parent.sender_player
		game =
		raise Http404
	context = base_context(request, game, sender_player)
		check_errors(request, game, sender_player, recipient_player)
	except LetterError, e:
		messages.error(request, e.value)
		return redirect(game)