diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-01-13 13:08:59 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-01-13 13:32:59 +0000 |
commit | 9c1f853d58440d1f924fa55bc242b248c410dd7c (patch) | |
tree | 0d4ed6019a7208e1e7c35015f5a33b7d0af89af8 /synapse/push/baserules.py | |
parent | Merge pull request #482 from matrix-org/markjh/table_name (diff) | |
download | synapse-9c1f853d58440d1f924fa55bc242b248c410dd7c.tar.xz |
Rename 'user_name' to 'user_id' in push to make it consistent with the rest of the code
Diffstat (limited to 'synapse/push/baserules.py')
-rw-r--r-- | synapse/push/baserules.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/push/baserules.py b/synapse/push/baserules.py index 57de0e34b4..8bac7fd6af 100644 --- a/synapse/push/baserules.py +++ b/synapse/push/baserules.py @@ -15,27 +15,27 @@ from synapse.push.rulekinds import PRIORITY_CLASS_MAP, PRIORITY_CLASS_INVERSE_MAP -def list_with_base_rules(rawrules, user_name): +def list_with_base_rules(rawrules, user_id): ruleslist = [] # shove the server default rules for each kind onto the end of each current_prio_class = PRIORITY_CLASS_INVERSE_MAP.keys()[-1] ruleslist.extend(make_base_prepend_rules( - user_name, PRIORITY_CLASS_INVERSE_MAP[current_prio_class] + user_id, PRIORITY_CLASS_INVERSE_MAP[current_prio_class] )) for r in rawrules: if r['priority_class'] < current_prio_class: while r['priority_class'] < current_prio_class: ruleslist.extend(make_base_append_rules( - user_name, + user_id, PRIORITY_CLASS_INVERSE_MAP[current_prio_class] )) current_prio_class -= 1 if current_prio_class > 0: ruleslist.extend(make_base_prepend_rules( - user_name, + user_id, PRIORITY_CLASS_INVERSE_MAP[current_prio_class] )) @@ -43,13 +43,13 @@ def list_with_base_rules(rawrules, user_name): while current_prio_class > 0: ruleslist.extend(make_base_append_rules( - user_name, + user_id, PRIORITY_CLASS_INVERSE_MAP[current_prio_class] )) current_prio_class -= 1 if current_prio_class > 0: ruleslist.extend(make_base_prepend_rules( - user_name, + user_id, PRIORITY_CLASS_INVERSE_MAP[current_prio_class] )) |