Skip to content

Commit

Permalink
Add activation token parameter to Email portal
Browse files Browse the repository at this point in the history
This may be needed by the email client to function properly
  • Loading branch information
nicolasfella committed May 23, 2022
1 parent 9de5150 commit ec5dd34
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions data/org.freedesktop.impl.portal.Email.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
The uris for files to attach.
</para></listitem>
</varlistentry>
<varlistentry>
<term>activation_token s</term>
<listitem><para>
A token that can be used to activate the chosen application.
</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="ComposeEmail">
Expand Down
10 changes: 9 additions & 1 deletion data/org.freedesktop.portal.Email.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
This simple portal lets sandboxed applications request to send an email,
optionally providing an address, subject, body and attachments.
This documentation describes version 3 of this interface.
This documentation describes version 4 of this interface.
-->
<interface name="org.freedesktop.portal.Email">
<!--
Expand Down Expand Up @@ -109,6 +109,14 @@
File descriptors for files to attach.
</para></listitem>
</varlistentry>
<varlistentry>
<term>activation_token s</term>
<listitem><para>
A token that can be used to activate the chosen application.
</para><para>
The activation_token option was introduced in version 4 of the interface.
</para></listitem>
</varlistentry>
</variablelist>
All the keys in the options are are optional.
Expand Down
3 changes: 2 additions & 1 deletion src/email.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ static XdpOptionKey compose_email_options[] = {
{ "cc", G_VARIANT_TYPE_STRING_ARRAY, validate_email_addresses },
{ "bcc", G_VARIANT_TYPE_STRING_ARRAY, validate_email_addresses },
{ "subject", G_VARIANT_TYPE_STRING, validate_email_subject },
{ "body", G_VARIANT_TYPE_STRING, NULL }
{ "body", G_VARIANT_TYPE_STRING, NULL },
{ "activation_token", G_VARIANT_TYPE_STRING, NULL }
};

static gboolean
Expand Down

0 comments on commit ec5dd34

Please sign in to comment.