* Accept caller-supplied attachment dimensions
Forward positional WIDTHxHEIGHT metadata supplied by the caller. Validate dimensions before sending and retain automatic image detection for omitted entries.
* Accept caller-supplied attachment BlurHashes
Forward positional BlurHashes supplied by the caller alongside attachment dimensions. Reject BlurHashes whose length doesn't match their size digit.
* Skip image probing when dimensions are supplied
Caller-supplied dimensions replace the probed values, so don't buffer and decode the image to measure it.
Consume the duration text token by token instead of validating the
whole string with a nested-quantifier regex, which could backtrack
exponentially on crafted input.
New listNotificationProfiles command to show the notification profiles
of the account and the current manual override, and a new
setNotificationProfile command to manually turn a profile on for a
duration or until a point in time, turn it off, or clear the manual
override. The override is written to the account storage record and
synced to the other devices, the same way the official clients do it.
Durations accept compact forms (90m, 1h37m), words (2 hours 30 minutes),
h:mm and ISO-8601. End times accept times of day, dates, ISO timestamps,
unix timestamps and "forever".
Notification profiles are stored as their own record type in the
storage service. Until now they were treated as unknown records, which
also meant they were dropped from the manifest on every force push.
Store them locally in a new notification_profile table and handle them
like the other synced record types (sticker packs in particular), so
they survive force pushes and can be read locally.
* Show and enforce the terminated state of a group
A group admin can permanently terminate a group. Afterwards the group is
read-only for everyone, not even an admin can send messages or start calls;
members keep access to the existing history. Other clients silently drop
messages sent to a terminated group.
Read the DecryptedGroup.terminated flag through GroupInfo.isTerminated() and:
- surface it in listGroups (json and plain text) and as the DBus IsTerminated
group property
- refuse to send to a terminated group locally (messages, reactions, typing and
group stories) rather than send one that other clients ignore
- drop incoming messages addressed to a terminated group
* Add terminateGroup command to terminate a group for everyone
Let a group admin permanently terminate a GroupV2 group via the
TerminateGroupAction (Groups.proto field 28, change epoch 7) the pinned library
already exposes as GroupsV2Operations.createTerminateGroup().
- GroupV2Helper.terminateGroup builds and commits the change
- GroupHelper.terminateGroup resolves/refreshes the group (v2 only), sends the
update to members and syncs storage, with the same conflict-retry as
updateGroup
- exposed through Manager.terminateGroup, the terminateGroup CLI/JSON-RPC command
and the DBus Group.terminateGroup method
---------
Co-authored-by: FailSpy <FailSpy@users.noreply.github.com>