load reads a user's inbox from the plugin data store.
(userId int)
| 126 | |
| 127 | // load reads a user's inbox from the plugin data store. |
| 128 | func (m *MudmailModule) load(userId int) Inbox { |
| 129 | var inbox Inbox |
| 130 | m.plug.ReadIntoStruct(inboxKey(userId), &inbox) |
| 131 | if inbox == nil { |
| 132 | inbox = Inbox{} |
| 133 | } |
| 134 | return inbox |
| 135 | } |
| 136 | |
| 137 | // save writes a user's inbox to the plugin data store. |
| 138 | func (m *MudmailModule) save(userId int, inbox Inbox) { |
no test coverage detected