Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# Connect to FreeSWITCH
self.freeswitch = Freeswitch(self.backend)
- @property
- def accounts(self):
- for account in self.backend.accounts:
- if not account.is_talk_enabled():
- continue
-
- yield account
-
- def search(self, query):
- accounts = []
-
- for account in self.backend.accounts.search(query):
- if not account.is_talk_enabled():
- continue
-
- accounts.append(account)
-
- return accounts
-
# Conferences
@property
q = self.get_argument("q")
# Perform the search
- accounts = self.backend.talk.search(q)
+ accounts = self.backend.accounts.search(q)
# Redirect when only one result was found
if len(accounts) == 1:
class AccountsListModule(ui_modules.UIModule):
def render(self, accounts=None):
if accounts is None:
- accounts = self.backend.talk.accounts
+ accounts = self.backend.accounts
return self.render_string("people/modules/accounts-list.html", accounts=accounts)