bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz#include "push-notification-event-mailboxcreate.h"
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarzstatic void push_notification_event_mailboxcreate_debug_mbox
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz(struct push_notification_txn_event *event ATTR_UNUSED)
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz i_debug("%s: Mailbox was created", EVENT_NAME);
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarzstatic void push_notification_event_mailboxcreate_event(
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz struct push_notification_event_config *ec,
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz struct push_notification_event_mailboxcreate_data *data;
6b88b35aa0d6edbcb530bc737f33356589f17996Timo Sirainen if (mailbox_get_status(ptxn->mbox, STATUS_UIDVALIDITY, &status) < 0) {
6b88b35aa0d6edbcb530bc737f33356589f17996Timo Sirainen i_error(EVENT_NAME "Failed to get created mailbox '%s' uidvalidity: %s",
bf7dc750b95039981c0e9d728f313d50cf38a156Martti Rannanjärvi mailbox_get_last_internal_error(ptxn->mbox, NULL));
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz struct push_notification_event_mailboxcreate_data, 1);
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz push_notification_txn_mbox_set_eventdata(ptxn, mbox, ec, data);
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz/* Event definition */
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarzextern struct push_notification_event push_notification_event_mailboxcreate;
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarzstruct push_notification_event push_notification_event_mailboxcreate = {
51ed197520dd9ea534fbc3bc1790ebe3cb5421e2Michael M Slusarz .debug_mbox = push_notification_event_mailboxcreate_debug_mbox