Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

546 B
Raw Blame
use email_api_client::domain::models::EmailApiError;
use models_email::gmail::gmail_ops::UnblockSenderPayload;
use models_email::service::link::Link;

use crate::pubsub::gmail_ops::worker::GmailOpsContext;

/// Finds and removes a block filter for a sender in Gmail.
#[tracing::instrument(skip(ctx, link), err)]
pub async fn unblock_sender(
    ctx: &GmailOpsContext,
    link: &Link,
    payload: &UnblockSenderPayload,
) -> Result<(), EmailApiError> {
    ctx.email_api
        .unblock_sender(link.id, &payload.email_address)
        .await
}