OBS: run migrations! This changes the Msg model to work with ManyToManyFields rather than with custom string representations for storing multiple receivers or channels. It also expands the Msg object with a "title" field and various filter options. This should make it easier to implement mail-like operations using the comms system.

This commit is contained in:
Griatch 2012-08-30 00:05:00 +02:00
parent 7995c91eee
commit dcc7f29a91
8 changed files with 656 additions and 381 deletions

View file

@ -85,8 +85,9 @@ class ChannelCommand(command.Command):
except AttributeError:
# this could happen if a player is calling directly.
sender = caller.dbobj
msgobj = Msg(db_sender=sender, db_message=msg)
msgobj = Msg(db_message=msg)
msgobj.save()
msgobj.senders = sender
msgobj.channels = channel
# send new message object to channel
channel.msg(msgobj, from_obj=sender)