-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The doubled message in MAM issue comes from the fact that MAM looks for a `mam_id` field in the accumulator when trying to save a message, and in the re-routing case, it is being stripped just a moment before. This happens, because re-routing uses the normal routing procedure, which strips the non-persistent accumulator fields, including the `mam_id`, in `mongoose_local_delivery`. Stripping is done, because in the usual routing case the perspective of the message processing changes at that point - sender processing is finished, and receiver processing starts. When retransmitting a message, we would like to process it from the receiver perspective once more, but with accumulator fields saved from the last time the it was processed. I decided to use the filter_unacknowledged_messages` hook in `mod_mam_pm`, which is called before retransmitting messages to save the `mam_id` as a permanent field in the accumulator. The "filter" name is analogous to the `filter_local_packet hook`, which is also used for processing in the broader sense than only filtering.
- Loading branch information
1 parent
aafbc75
commit 4bc5975
Showing
4 changed files
with
171 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters