Merge lp:~gingerchris/endroid/roomownerfixes into lp:endroid
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | ChrisD | ||||||||
Approved revision: | 63 | ||||||||
Merged at revision: | 61 | ||||||||
Proposed branch: | lp:~gingerchris/endroid/roomownerfixes | ||||||||
Merge into: | lp:endroid | ||||||||
Diff against target: |
308 lines (+164/-72) 2 files modified
src/endroid/plugins/roomowner.py (+60/-4) src/endroid/usermanagement.py (+104/-68) |
||||||||
To merge this branch: | bzr merge lp:~gingerchris/endroid/roomownerfixes | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Morrison | Approve | ||
Review via email: mp+184596@code.launchpad.net |
Commit message
RoomOwner fixes
Description of the change
Following roomowner changes:
* Mark and sweep MUC member list before changing any member affiliations (#1222857)
* Change room owner to only configure MUCs that EnDroid owns (#1222858)
In addition:
* As a result of moving MUC affiliation changes to the roomowner plugin, the functions are removed from usermanagement that performed these actions.
* Now that affiliation is only changed once EnDroid has joined the room the old 'deferreds' list is no longer required so that is removed
* Correct the error handling in configure_room to use trap correctly.
The following APIs are added to UM:
* room_modify_
* room_memberlist
* is_room_owner
* get_configured_
* get_room_memberlist
It is noted that these are room-centric API's on an object/class called 'usermanagement'. Though there is precedence here (e.g. configure_room) this isn't ideal. Open to suggestions (blueprints) on how to re-org.
Note: this goes some way to implementing BP advanced-roomowner however it falls short in a few key areas:
* MUC memberlist config is being read by both core EnDroid and roomowner (and indeed can be specified in both config sections).
* EnDroid core is still joing all rooms and roomowner assumes it owns all rooms specified in config.
* No additional support for non-standard MUC implementations (and supported config).
get_room_memberlist and is_room_owner should guarantee to return a Deferred, rather than returning None if bad args are given. Using defer.fail would make sense here.
I think owner_result and parse_memberlist in the RoomOwner plugin should be inner funcs as they are just locally used callbacks (this would match the pattn used elsewhere in Enadroid, including further down in this diff).