Repository navigation
feat(notifications): inline replies to message notifications - #263
Merged
Merged
Conversation
On notification servers that advertise the "inline-reply" capability (swaync, KDE Plasma), message notifications get a reply field instead of the plain Reply button. Text typed there arrives as NotificationReplied and is sent to the conversation over MAP, the same path as --bt-send. Servers without the capability keep the existing Reply button, which opens the thread in tether-gtk. The send-in-background-and-broadcast logic behind bt_send_message moves into send_bt_message_async so both entry points share it. A failed inline reply raises a "Reply not sent" notification, since there is no window to show the error in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Reply to an SMS/iMessage straight from its desktop notification, the way macOS lets you type into the banner, instead of the Reply button opening tether-gtk.
On notification servers that advertise the
inline-replycapability (swaync, KDE Plasma), message notifications now carry aninline-replyaction plus thex-kde-reply-placeholder-texthint. The server shows a text field and answers with theNotificationReplied(id, text)signal, which tetherd sends to the conversation over MAP, the same path--bt-senduses.Servers without the capability are unchanged: they get the existing Reply button, which opens the thread in tether-gtk. Clicking the notification body still opens the thread everywhere.
How
DesktopNotifier::set_reply_handler, alongside the existing copy handler.NotificationRepliedfrom its own GLib thread, so the signal lands on the context that owns the notification id → thread map. Entries are dropped on reply or when the notification closes (swaync emitsNotificationRepliedbefore closing).bt_message/bt_send_result" block behindbt_send_messagemoves intosend_bt_message_async, so the IPC command and inline replies share it and the GUI history updates either way.po/tether.potregenerated for the two new strings ("Reply…", "Reply not sent"); the.pofiles are left for translators.Testing
notification-inline-repliesenabled), iPhone over BR/EDR + LE.ctest: 595/595 pass, includingpo_template.inline-reply/NotificationRepliedconvention.🤖 Generated with Claude Code