masterofdestiny
masterofdestiny

Reputation: 2811

Django: Message is not receieving

I am using Django Postman for the intercommunication between two user of my django website .

But when i am sending a message to another user .It is not delivered to the recepient .

I shows me as sent message .In http://127.0.0.1:8000/messages/sent

Here is settings.py setting

#############################   Django postman 

POSTMAN_AUTO_MODERATE_AS = True
POSTMAN_SHOW_USER_AS = True
POSTMAN_NOTIFIER_APP = True
###################################

And once the messages is sent it is storing properly in the Dtabase but it is not appearing to the recepient inbox.

Please tell me what might I am doing wrong here .

Upvotes: 1

Views: 227

Answers (1)

zencodism
zencodism

Reputation: 442

I encountered seemingly identical problem, in my case cause was default moderation.

To better diagnose if this is the case, you can:

  • check your 'invisible' messages in database, for example using phpmyadmin. If there's 'p' as m moderation_status or anything suspicious under moderation_... columns, this track is probably good;
  • dig into code: locate postman/models.py and experiment with class MessageManager, method inbox (since other message directories are fine, this one is suspicious). Any of filters there might be cause of your problem - for me it was obviously 'moderation_status'. Even if your case is different, this is good starting point for further debugging.

Use case: let's assume moderation issues

I see that you have

POSTMAN_AUTO_MODERATE_AS = True

set, but perhaps you have left moderation function somewhere, or something gets overwritten in your configuration? Postman's Quick Start Guide indicates that both are necessary:

To disable the moderation feature (no control, no filter):

  • Set this option to True
  • Do not provide any auto-moderation functions

I'd suggest removing all other postman specific options from your settings.py, leaving only POSTMAN_AUTO_MODERATE_AS = True and check if there are any utility functions that could potentially interfere with Message objects.

For further reference, more information about moderation is here: https://bitbucket.org/psam/django-postman/wiki/Moderation

Upvotes: 1

Related Questions