badge-service: a Play charge whose clipped period start leaves its month
already spent is answered as period over, not internal (R1-A1).
docs: the per-store answer classes list Play's 410 and the App Store
subscription check (R1-A2).
tests: a held receipt with no attempt yet blocks an invoice (R1-B2); a
renewing report keeps an ended status (R1-B3); a test comment names
[google] (run 005 C2-R2-1).
ios: a subscription refused because this Apple ID subscribed before
shows its sentence, not the error's name (R1-C2); ios, android, desktop:
the Check your order footnotes share one helper (R1-C3).
Run: 006-subscriptions-branch-review, review round 1
Anyone holding a real but uncreditable App Store subscription JWS, such as
their own lapsed subscription, could present it again and again, each time
spending an App Store Server API call from the quota every subscriber's
renewal check needs. The purchase path now remembers, in memory, which
subscription claims it asked about within the hour and answers a repeat
payment_pending with the time left. Keys are original transaction ids from
JWS that verified offline, entries expire after the hour, and a full table
asks rather than refuses, so memory stays bounded and no buyer waits on
another's claim.
Run: 005-subscriptions-load-timing, slice 4
* badge-service: accept a list of Apple roots
* badge-service: document root_certificates
---------
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
The Play subscription check reads purchases.subscriptionsv2 by token
through the existing service-account client, with the same HTTP classes as
product reads, and maps Play's state, base plan, period, order id and
offer phase; the period start is its end minus the plan's length, and a
pending subscription stays pending. A subscription is acknowledged with
purchases.subscriptions.acknowledge before it is credited, skipped when
Play reports it acknowledged, so it never reaches the one-time endpoint.
Each store's subscriptions answer provider_not_configured when that store
is not configured. A charge on a plan the catalog does not sell is pending
rather than a malformed period.
Run: 001-badge-subscriptions, slice 7
While a subscription purchase's coverage runs, issueBadge is unchanged
and makes no store call. Once it has ended, the service asks the store at
most once an hour per subscription, stamping every attempt, and answers
from the stored state in between; a failed check is retried after the
whole interval. A grantable charge is planned from the tip at the store's
period start, signed, and written with its issuance and state in one
transaction that re-reads the tip, answering internal if it moved. Any
other charge and the state are recorded without a ledger row. Every answer
for a subscription purchase carries its state.
Run: 001-badge-subscriptions, slice 4
The catalog now tells subscription products from one-time ones and maps a
store plan to its tier and months. A subscription receipt is checked with
the store once: with a grantable charge, the service plans the charge's
rows from the store's period start, signs the first month, and writes the
payment, purchase, charge, ledger rows, issuance, state and Play token in
one transaction, answering with the subscription state. Without one, it
answers payment_pending (300 s while the period has not started or the
store is pending, a day otherwise), receipt_invalid for an ended Play
subscription, or test_purchase, and writes nothing. Replays carry the
state. The store verifier interface gains the subscription check, which no
real store implements yet; the fake store does.
Run: 001-badge-subscriptions, slice 3b
* core: compress messages if needed to fit envelope, even if there is no PQ e2ee in connection
* simplify
* remove noise
* compress messages without PQ too
* case
* update query plans
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* core: cancel the chat callback on interrupt
* badges: add multi-use codes
* badges: add the managed group
* badges: document multi-use codes and the group
* core: sign test badges with whole-second expiry
* badges: rework tracker and reply texts
* core: plan for supporter badges
* ledger maths
* update plan
* language
* lines
* lists
* redeem
* badge rpc protocol and draft service schema/plan
* update badge service protocol to support upgrades
* badge purchase ledger types and schema
* type, mvp plan
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
* rfc: bot messages and buttons
* update
* update bot rfc
* core: add bot commands to chat preferences and peer type to profile
* update postgresql schema
* update query plans
* chat sessions preference
* markdown for bot commands
* schema
* core: file preference, options to create bot from CLI
* core: different command type
* ios: commands menu
* update types
* update ios
* improve command markdown
* core, ios: update types
* android, desktop: clickable commands in messages in chats with bots
* android, desktop: commands menu
* command menu button, bot icon
* ios: connect flow for bots
* android, desktop: connect flow for bots
* icon
* CLI commands to view and set commands, remove "hidden" property of command, bot api docs
* corrections
* fix inheriting profile preferences to business groups
* note on business address
* ios: export localizations
* fix test
* commands to set file preference on user/contact, tidy up layout and display of command and attachment buttons
* website: add fontmatter & improve image URLs where necessary
* website: add docs to website
* website: add prismjs for code highlighting
* website: change npm install position in web.sh
* website: fix an image URL in lang/cs/README.md
* website: improve image paths in lang/cs/translations.md
* website: add responsiveness & improve stylings of docs
* website: add dir to navbar in blog & docs
* website: remove scroll in mobile dropdown menu
* website: remove rfcs & add guide docs to website
* website: remove file renaming script from web.sh
* website: add menu to docs in nav
* website: add hash list & add scroll to headers
* website: customize docs frontmatter through JS
* website: remove supported_languages.json
* website: move merge_translations.js to JS folder
* website: add the following changes to docs
- add frontmatter to new doc merged from master
- add ignoreForWeb property to frontmatter of README.md docs
* website: remove package-lock.json from .gitignore
* website: add package-lock.json from .gitignore
* website: add no docs message to docs dropdown
* website: improve the sidebar of docs
* website: add revision date to docs
* website: add script to add version to docs frontmatter
* website: add layout to display message in docs if its version is old
* website: improve nav responsiveness
* website: remove frontmatter form main README & rfcs
* website: remove rfcs from website folder
* website: add ignore condition for rfcs in .eleventy
* website: remove frontmatter from lang README docs
* website: remove README from website's lang docs
* website: add guides menu in nav
* website: following changes
- add docs_dropdown.json
- extend reference menu in nav
- remove docs menu from nav
* website: fix in docs sidebar
* website: revert main docs README.md files
* website: revert main docs README.md files
* website: move scripts out of js that are for build
* website: remove displayAt form guide docs
* website: create a docs_sidebar.json & shift to that approach
* update navigation
* website: set navbar
* website: add icons to external links
* website: change the approach for docs sidebar creation
* website: update docs template
* website: add some strings to en.json and map them accordingly
* remove icon
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* core: protocol/commands to change member role
* change member roles
* add test
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* add member profile to group member role events
* resend invitation when invited member role changes
* test role change with invitation, fix
* add delays to tests
* add test delay
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>