Adium

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#13485 closed enhancement (fixed)

StatusNet configuration should allow the user of Adium to override the 140 character limit

Reported by: grahamperrin Owned by: kbotc
Milestone: Adium 1.5 Component: Service/StatusNet-Identi.ca
Version: Severity: normal
Keywords: StatusNet Cc:
Patch Status: Accepted

Description

http://brainbird.net/notice/892857 demonstrates that some StatusNet instances may vary from the (debatable) 140 character norm.

http://brainbird.net/conversation/892835#notice-892835 demonstrates truncation of a long message sent using Adium to that type of instance.

Suggestions

Each StatusNet configuration in Adium should allow the user to vary from the 140 character limit.

Also: if the user omits to set a variation, and if the user simply sends a notice longer than 140 characters, Adium should not truncate the message.

See also

http://status.net/trac/ticket/2037, OMB specification: server should declare its character limit

Attachments (4)

statusnet-limit-config.diff (4.2 KB) - added by Brion Vibber 10 years ago.
Patch to query StatusNet config API for text limit at connect time (newly exposed in 0.9)
statusnet-limit-config-updated.diff (4.2 KB) - added by Brion Vibber 10 years ago.
Updated patch, cleaned up for single return
statusnet-limit-config-fixed-warnings.diff (4.5 KB) - added by Brion Vibber 10 years ago.
More code style tweaks per review in #adium-devl: clean up use of self->, use AILog instead of NSLog for config fetch error
statusnet-limit-config-non-blocking.patch (6.1 KB) - added by kbotc 9 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 Changed 10 years ago by Zachary West

Resolution: worksforme
Status: newclosed

In the next beta the forced truncation is being removed.

comment:2 Changed 10 years ago by Zachary West

Resolution: worksforme
Status: closednew

Oh I see, you want a preference for the limit. Hmmm. That would require some changes.

comment:3 Changed 10 years ago by Zachary West

Milestone: Adium 1.4.x

comment:4 in reply to:  1 Changed 10 years ago by Graham Perrin

Replying to zacw:

In the next beta the forced truncation is being removed.

Verified, thanks; http://brainbird.net/notice/922533 (and cross-post http://twitter.com/grahamperrin/status/6186575287).

preference for the limit. Hmmm. That would require some changes.

Maybe defer any changes in that area until after developers of StatusNet comment on http://status.net/trac/ticket/2037

Changed 10 years ago by Brion Vibber

Attachment: statusnet-limit-config.diff added

Patch to query StatusNet config API for text limit at connect time (newly exposed in 0.9)

comment:5 Changed 10 years ago by Brion Vibber

The StatusNet configuration query API is adding the character limit in 0.9.x; attached patch above checks this at connection time and, if a limit is given, uses that instead of the 140 default.

If the setting changes on the server, it'll be reflected after the next disconnect/connect.

Example of the config API: https://identi.ca/api/statusnet/config.xml

(Note that the 'textlimit' var may not yet be exposed on identi.ca as we haven't deployed the update as of this writing, but I've confirmed it picks up valued correctly from our StatusNet 0.9.x work branch and continues to use the defaults on older installations.)

comment:6 Changed 10 years ago by Robert

Patch Status: Needs Dev Review

comment:7 Changed 10 years ago by Chaos_99

Hi, I'm using 1.4b17 here, which is 2 releases more recent than the version of the original poster.

If I'm understanding this "In the next beta the forced truncation is being removed." and this "Verified, thanks;" correctly, the enforcement should be gone in my revision.

I nevertheless get a char count while typing and a 'connection error' if I'm over 140 chars. Are there any further requirements on the server to allow larger messages for now? (Except of course the larger message size itself.)

Thanks

comment:8 Changed 10 years ago by kbotc

Does not match code style guidelines.

http://trac.adium.im/wiki/CodingStyle#Multiplereturnstatements

Fix it, and I'll put this as OK to apply.

Changed 10 years ago by Brion Vibber

Updated patch, cleaned up for single return

comment:9 Changed 10 years ago by Robert

Milestone: Adium 1.4.xAdium 1.4.1
Owner: set to kbotc

comment:10 Changed 10 years ago by kbotc

Sorry to be so nit-picky, but for readability sake, go ahead and change the name of textLimit in the queryTextLimit method to something unique. It will become confusing during debugging as there is already an ivar of the same name. Also, in cocoa, when you're trying to reference an instance variable, you do not need to use the self-> arrow operator. Drop that as well, so that self->textlimit is just textlimit.

comment:11 Changed 10 years ago by Robert

Patch Status: Needs Dev ReviewNeeds Changes by Author

Changed 10 years ago by Brion Vibber

More code style tweaks per review in #adium-devl: clean up use of self->, use AILog instead of NSLog for config fetch error

comment:12 Changed 10 years ago by Robert

Patch Status: Needs Changes by AuthorNeeds Dev Review

comment:13 Changed 10 years ago by Zachary West

This needs to be non-blocking.

comment:14 Changed 10 years ago by Robert

Patch Status: Needs Dev ReviewNeeds Changes by Author

comment:15 Changed 9 years ago by Evan Schoenberg

Milestone: Adium 1.4.1Adium 1.4.2

comment:16 Changed 9 years ago by Robert

Component: Adium CoreService/StatusNet-Identi.ca
Milestone: Adium 1.4.2Adium 1.4.3

comment:17 Changed 9 years ago by Evan Schoenberg

Milestone: Adium 1.4.3Good ideas for later

I'm moving this off a milestone until it's made non-blocking.

comment:18 Changed 9 years ago by Paul Wilde

Milestone: Good ideas for laterPatches Needing Improvement

Pushing to the new "Patches Needing Improvement" milestone.

comment:19 Changed 9 years ago by kbotc

Milestone: Patches Needing ImprovementAdium 1.5
Patch Status: Needs Changes by AuthorOK; Needs Check-In
Version: 1.4b151.5hg

comment:20 in reply to:  13 Changed 9 years ago by Robert

Milestone: Adium 1.5Patches Needing Improvement
Patch Status: OK; Needs Check-InNeeds Changes by Author

kbotc, Replying to zacw:

This needs to be non-blocking.

xnyphs just agreed:

20:46:19 xnyhps: -initWithContentsOfURL: is a big no-no. We have an asynchronous API for that.

Changed 9 years ago by kbotc

comment:21 Changed 9 years ago by Robert Vehse

Resolution: fixed
Status: newclosed

(In f5b424ece00d) Patch from kbotc based on one by brion: allow overriding the 140 character limit for StatusNet. Fixes #13485.

comment:22 Changed 9 years ago by Robert

Milestone: Patches Needing ImprovementAdium 1.5
Patch Status: Needs Changes by AuthorAccepted
Note: See TracTickets for help on using tickets.