Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
patch the name property of the base hangups.conversation.Conversation
Browse files Browse the repository at this point in the history
use a fallback to ```permamem.ConversationMemory.get_name(<conv>)```
  • Loading branch information
das7pad committed Jun 4, 2017
1 parent 163cd4a commit e9da7a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hangupsbot/hangups_conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ def __init__(self, bot, conv_id):

super().__init__(self._client, self._user_list, conversation, [])

@property
def name(self):
"""get the custom title or gernerate one from participant names
Returns:
string
"""
live = self._conversation.name
return live or self.bot.conversations.get_name(self)

@asyncio.coroutine
def send_message(self, message, image_id=None, otr_status=None, context=None):

Expand Down

0 comments on commit e9da7a3

Please sign in to comment.