Keep stacked notification images and warn when OEM AUTO_START blocks UnifiedPush.
Attach image thumbnails via MessagingStyle message data so they survive multi-message history, drop useless image filenames, and surface TCL App Boot blocks in settings.
This commit is contained in:
@@ -172,6 +172,7 @@ type PushStatus = {
|
||||
endpoint: string;
|
||||
distributors: string[];
|
||||
lastFailure: string;
|
||||
autoStartBlocked: boolean;
|
||||
};
|
||||
|
||||
/** Android-only section showing UnifiedPush registration status and controls. */
|
||||
@@ -196,6 +197,7 @@ function AndroidPushNotifications() {
|
||||
endpoint: s.endpoint || '',
|
||||
distributors,
|
||||
lastFailure: s.lastFailure || '',
|
||||
autoStartBlocked: Boolean(s.autoStartBlocked),
|
||||
}
|
||||
: undefined
|
||||
);
|
||||
@@ -246,6 +248,13 @@ function AndroidPushNotifications() {
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
if (status.lastFailure === 'AUTO_START_BLOCKED' || status.autoStartBlocked) {
|
||||
return (
|
||||
<Text as="span" style={{ color: color.Critical.Main }} size="T200">
|
||||
Phone is blocking auto-start for Paarrot. Open App Boot / Auto-start settings, allow Paarrot (and ntfy), then tap Reset.
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
if (status.lastFailure) {
|
||||
return (
|
||||
<Text as="span" style={{ color: color.Critical.Main }} size="T200">
|
||||
|
||||
@@ -121,7 +121,8 @@ function notificationBodyFromEvent(mEvent: MatrixEvent): string | undefined {
|
||||
const rawBody = typeof content.body === 'string' ? content.body : undefined;
|
||||
switch (content.msgtype) {
|
||||
case 'm.image':
|
||||
return rawBody ? `📷 ${rawBody}` : '📷 Photo';
|
||||
// Matrix body is usually a filename — skip it in the shade.
|
||||
return '📷 Photo';
|
||||
case 'm.video':
|
||||
return rawBody ? `🎥 ${rawBody}` : '🎥 Video';
|
||||
case 'm.audio':
|
||||
@@ -129,7 +130,7 @@ function notificationBodyFromEvent(mEvent: MatrixEvent): string | undefined {
|
||||
case 'm.file':
|
||||
return rawBody ? `📎 ${rawBody}` : '📎 File';
|
||||
case 'm.sticker':
|
||||
return rawBody ? `🖼️ ${rawBody}` : '🖼️ Sticker';
|
||||
return '🖼️ Sticker';
|
||||
default:
|
||||
return rawBody;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ type UnifiedPushStatus = {
|
||||
distributor: string;
|
||||
distributors: string[] | string;
|
||||
lastFailure?: string;
|
||||
/** OEM App Boot / AUTO_START is blocking distributor broadcasts (e.g. TCL). */
|
||||
autoStartBlocked?: boolean;
|
||||
};
|
||||
|
||||
type ClearRoomNotificationsResult = {
|
||||
|
||||
Reference in New Issue
Block a user