Skip to content

Commit

Permalink
presence: test if event is dialog when attempting to delete old records
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 28, 2018
1 parent bc96bba commit 55c7f78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/presence/presentity.c
Expand Up @@ -380,6 +380,10 @@ int delete_presentity_if_dialog_id_exists(presentity_t* presentity,
int i = 0;
presentity_t old_presentity;

if (presentity->event->evp->type != EVENT_DIALOG) {
return 0;
}

query_cols[n_query_cols] = &str_domain_col;
query_ops[n_query_cols] = OP_EQ;
query_vals[n_query_cols].type = DB1_STR;
Expand Down

0 comments on commit 55c7f78

Please sign in to comment.