Commit graph

9 commits

Author SHA1 Message Date
Moriel Schottlender 879fe27bc6 When fetching combined seenTime, get 'min' value rather than max
This will make the mobile view show unseen state if any of the
badges have unseen state rather than not show it if one of the
badges was more recently seen than the other in desktop.

Bug: T141404
Change-Id: I27109ee6a24831d58767f9bd13ed58e54094aee1
2016-08-01 19:14:51 +00:00
Matthew Flaschen 954e076fd1 SeenTime: For 'all', use MW, then convert after taking max.
Lesser-used formats like TS_ORACLE are not string-comparable.

Change-Id: I7a9fd3ac0c8b1e924f6f0e8970f7a005858df9d7
2016-07-28 20:11:30 -04:00
Moriel Schottlender b623bdc6d3 Forward format to seenTime when getting 'all' types
Change-Id: Id79c4403ea879bb08b0ce94d24f7bdbb8ea83560
2016-07-28 15:09:16 -07:00
jenkins-bot bf502f89a0 Merge "Allow requesting TS_ISO_8601 for ApiEchoMarkSeen, and deprecate TS_MW" 2016-07-21 02:04:06 +00:00
Matthew Flaschen 756948d489 Allow requesting TS_ISO_8601 for ApiEchoMarkSeen, and deprecate TS_MW
(Previously TS_MW was the only possibility).

Per https://www.mediawiki.org/wiki/API:Data_formats#Timestamps

Bug: T139993
Change-Id: Ief9a720a5053ee153b84edb64524aa4743cc76f1
2016-07-20 18:22:28 -04:00
Matthew Flaschen c05133283a Add seen time to output of API, in ISO 8601 format
Like count, it is available both grouped by section and ungrouped
(top-level).

Unlike count, the top-level still has both sections (but with the
string 'seenTime' at the root), and if groupbysection is used,
it will not also have top-level (since it would be redundant).

Example output at T139993

It will be false or omitted if there is no seen time, depending
on JSON format version (2+ is false).

Bug: T139993
Change-Id: I9f4f9df69203204b56002afa1be6ed2336c33898
2016-07-20 09:25:03 -07:00
Siebrand Mazeland 33126b69aa Update formatting
In preparation of Code Sniffer based updates.

Change-Id: Id5d43332b44a37665d57dc24ef8c432bc65b2f6a
2015-10-03 23:28:54 -04:00
Moriel Schottlender e650df6644 Separate 'seen time' for alerts and messages
Bug: T111285
Change-Id: I277f94ae705d3323ac8612111d7fd704b36793cb
2015-09-03 13:14:15 -07:00
Kunal Mehta 35c4a37918 Use db-replicated objectcache for storing last seen time
So we're not abusing user preferences for the last seen time.
EchoSeenTime is a small wrapper around ObjectCache that handles the
fallback to user preferences during the transition.

All JavaScript code now needs to use mw.config.get('wgEchoSeenTime').

Bug: T95839
Change-Id: Ia45ba5e30eb4564250539d04d5886d2598ebd49a
2015-09-02 22:42:35 +00:00