Push tokens check in, five switches ride along
The API now keeps one Firebase token per signed-in phone, so the next release has somewhere to send your notifications. Five new per-user switches decide what is allowed to arrive.
Top storyFirst on the front page.

You install the build, sign in on your phone, and the app hands its fresh Firebase token to the server. Back comes 204 No Content, and the token is tucked onto the device row that signed the request. There is no device id in the URL, because the phone can only speak for itself. Sign in again elsewhere with the same token and it walks over to the newest owner, wiping the old row so nothing lands twice.
Credit goes to simonhamp, who gave the API somewhere to keep all this. That means three new columns on the device. One holds the token itself, encrypted. Another holds its SHA-256 hash under a unique index. The third holds the platform, ios or android. Users also get five boolean columns, and every one is on by default. The switches are follows, replies, mentions, direct remotes and org remotes. Saving preferences takes all five at once and answers with the same object the settings endpoint shows under push.
There is one catch. Nothing is pushed yet. The switches cover three notification types. Those are follows, replies and mentions. Approvals, rejections, quotes, stars, level-ups and first commits have no switch because they are not on the push list. And if a phone signs out without sending DELETE to me/push-token first, that token sits on the server until someone revokes the device.