Commit ef7b950e authored by valtron's avatar valtron

fix: accept is_favorite when adding group

parent 594fc4c1
......@@ -141,11 +141,11 @@ class Backend:
self._sync_contact_statuses()
self._generic_notify(sess)
def me_group_add(self, sess, name):
def me_group_add(self, sess, name, *, is_favorite = None):
if len(name) > MAX_GROUP_NAME_LENGTH:
raise error.GroupNameTooLong()
user = sess.user
group = Group(_gen_group_id(user.detail), name)
group = Group(_gen_group_id(user.detail), name, is_favorite = is_favorite)
user.detail.groups[group.id] = group
self._mark_modified(user)
return group
......
......@@ -204,7 +204,8 @@ async def handle_abservice(req):
})
if action_str == 'ABGroupAdd':
name = _find_element(action, 'name')
group = backend.me_group_add(ns_sess, name)
is_favorite = _find_element(action, 'IsFavorite')
group = backend.me_group_add(ns_sess, name, is_favorite = is_favorite)
return render(req, 'abservice/ABGroupAddResponse.xml', {
'cachekey': cachekey,
'host': settings.LOGIN_HOST,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment