feat: вродь диплинки и /start
This commit is contained in:
@@ -412,11 +412,19 @@ class CachedMessage {
|
||||
this.editHistory,
|
||||
});
|
||||
|
||||
bool get isBotStartMarker {
|
||||
final control = attachments?.whereType<ControlAttachment>().firstOrNull;
|
||||
return control != null && control.isBotStart;
|
||||
ControlAttachment? get controlAttachment =>
|
||||
attachments?.whereType<ControlAttachment>().firstOrNull;
|
||||
|
||||
String? get botStartPayload {
|
||||
final control = controlAttachment;
|
||||
if (control == null || !control.isBotStart) return null;
|
||||
final payload = (control.startPayload ?? text)?.trim();
|
||||
return (payload == null || payload.isEmpty) ? null : payload;
|
||||
}
|
||||
|
||||
bool get isSilentBotStart =>
|
||||
(controlAttachment?.isBotStart ?? false) && botStartPayload == null;
|
||||
|
||||
CachedMessage copyWith({
|
||||
String? status,
|
||||
bool? deleted,
|
||||
|
||||
Reference in New Issue
Block a user