Add maxMessageSize() method so it can be overridden in Context subclasses. #19

Merged
merged 1 commit into from May 14, 2012

Conversation

Projects
None yet
2 participants
Contributor

mmb commented May 14, 2012

This change will let Context subclasses calculate max message size per
context, and possibly even per message based on appdata.

The driver for this is IRC, where the amount of space allowed for the OTR
message depends on the length of the destination nick. The IRC message
would look like:

PRIVMSG mmb :?OTR:...

Instead of hardcoding a low MMS that accounts for the longest possible
nick a method would allow the context to take the destination nick into account
when calculating MMS.

@mmb mmb Add maxMessageSize() method so it can be overridden in Context subcla…
…sses.

This change will let Context subclasses calculate max message size per
context, and possibly even per message based on appdata.
f394055

@afflux afflux added a commit that referenced this pull request May 14, 2012

@afflux afflux Merge pull request #19 from mmb/per_context_mms
Add maxMessageSize() method so it can be overridden in Context subclasses.
c7fd356

@afflux afflux merged commit c7fd356 into python-otr:master May 14, 2012

Contributor

afflux commented May 14, 2012

Good point, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment