Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Put most recent 20 messages in notif #892

Merged
merged 3 commits into from Jun 23, 2016

Conversation

Projects
None yet
2 participants

@erikjohnston erikjohnston commented on an outdated diff Jun 22, 2016

synapse/storage/event_push_actions.py
@@ -191,7 +192,7 @@ def get_no_receipt(txn):
"actions": json.loads(row[3]),
"received_ts": row[4],
} for row in after_read_receipt + no_read_receipt
- ])
+ ][0:limit])
@erikjohnston

erikjohnston Jun 22, 2016

Owner

Generally you write [:limit], but no biggie

Owner

erikjohnston commented Jun 22, 2016

LGTM, assuming tests pass

dbkr added some commits Jun 22, 2016

Actually we need to order these properly
otherwise we'll end up returning the wrong 20
Member

dbkr commented Jun 22, 2016

Sorry, realised this wouldn't work: it would end up not returning the most recent 20. This should be a bit better.

Owner

erikjohnston commented Jun 22, 2016

LGTM

@dbkr dbkr merged commit 13517e2 into develop Jun 23, 2016

9 of 10 checks passed

Sytest Dendron (Merged PR) Build finished.
Details
Flake8 + Packaging (Commit) Build #1047 origin/dbkr/email_notif_most_recent succeeded in 36 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Dendron (Commit) Build #163 origin/dbkr/email_notif_most_recent succeeded in 6 min 42 sec
Details
Sytest Postgres (Commit) Build #1003 origin/dbkr/email_notif_most_recent succeeded in 6 min 25 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #1017 origin/dbkr/email_notif_most_recent succeeded in 5 min 34 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #1087 origin/dbkr/email_notif_most_recent succeeded in 1 min 30 sec
Details
Unit Tests (Merged PR) Build finished.
Details

@richvdh richvdh deleted the dbkr/email_notif_most_recent branch Dec 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment