Skip to content

Commit f96412a

Browse files
committed
Search for messages by message id
1 parent 91a9f31 commit f96412a

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
99
-NaN
1010

1111
### Added
12-
-NaN
12+
- Search for messages by message id
1313

1414
### Affected Classes
15-
-NaN
15+
- [Query::class](src/Query/Query.php)
1616

1717
### Breaking changes
1818
-NaN

src/Query/WhereQuery.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,29 @@ public function whereIsXSpam(){
413413
return $this->where("CUSTOM X-Spam-Flag YES");
414414
}
415415

416+
/**
417+
* Search for a specific header value
418+
* @param $header
419+
* @param $value
420+
*
421+
* @return WhereQuery
422+
* @throws InvalidWhereQueryCriteriaException
423+
*/
424+
public function whereHeader($header, $value){
425+
return $this->where("CUSTOM HEADER $header $value");
426+
}
427+
428+
/**
429+
* Search for a specific message id
430+
* @param $messageId
431+
*
432+
* @return WhereQuery
433+
* @throws InvalidWhereQueryCriteriaException
434+
*/
435+
public function whereMessageId($messageId){
436+
return $this->whereHeader("Message-ID", $messageId);
437+
}
438+
416439
/**
417440
* @param $country_code
418441
*

0 commit comments

Comments
 (0)