-
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 issue came from the fact that MAM looks for a `mam_id` field in the accumulator when trying to save a message. This should prevent double messages in scenarios such as retransmitting a message. However, when rerouting uses the normal routing procedure, which strips the nonpersistent accumulator fields. This is done, because in the normal case the perspective of the message processing changes - sender processing is done, and receiver processing starts. When retrasmitting messages, we would like to process it from the receiver perspective once more, but with accumulator fields saved from the last time the message 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 6623ca1
Showing
4 changed files
with
174 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